Skip to main content
DHou.1
Associate
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

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.
    DHou.1
    DHou.1Best answer
    Associate
    August 5, 2022

    Fixed with PR#12

    2 replies

    Eleon BORLINI
    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.1
    DHou.1AuthorBest answer
    Associate
    August 5, 2022

    Fixed with PR#12