Skip to main content
Visitor II
July 13, 2022
Solved

MLC Python scripts: The decision tree generator code in the MLC.ipynb file in the MLC repo throws error out of box

  • July 13, 2022
  • 1 reply
  • 1059 views

When trying to run MLC.ibynb in the MLC repo (STMems_Machine_Learning_Core/MLC.ipynb at master · STMicroelectronics/STMems_Machine_Learning_Core (github.com)), there is error thrown from the with call stack:

generateDecisionTree > printTree > formatTree > genNextLineIndex

if (getNodeNum(line) == int(num))

ValueError: invalid literal for int() with base 10: ''

Clearly the line being passed in is empty. Does this result from there being empty lines in the ARFF files generated by the Unico API? Any help is appreciated.

    This topic has been closed for replies.
    Best answer by DHou.1

    Fixed with PR#12

    1 reply

    ST Employee
    July 25, 2022

    Hi @DHou.1​ ,

    Are you using the MLC.ipynb you can find in the repository or did you make some modification to that code?.

    It the latter case, you might send the script code to me and I'll share it with our experts.

    -Eleon

    DHou.1AuthorAnswer
    Visitor II
    August 5, 2022

    Fixed with PR#12