cancel
Showing results for 
Search instead for 
Did you mean: 

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

DHou.1
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
Eleon BORLINI
ST Employee

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

Fixed with PR#12