cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate an .ucf/.h file from decision tree .txt file (j48 format).

HFenz
Associate II

The standard way to generate a header file with MLC register settings is to generate from decision-tree .txt file (exportet from WEKA or python).

In our project we want to avoid tool interaction.

The register settings (ucf or header file) should be generated by a script (python....).

Is there a way without user interaction to create the register settings from (weka) decision trees?

regards

Hari

5 REPLIES 5
Eleon BORLINI
ST Employee

Hi @HFenz​ ,

currently you have to upload the decision tree from Weka to Unico-GUI, as described in this step-by-step online tutorial.

However, ST is working for a tool-free script (should be in python, or a C library for CubeMX).

I'll get back to you in case of recent updates.

-Eleon

HFenz
Associate II

Hi Eleon,

Thank you for the answer.

A python script would be great.

Thanks

Hari

Hi @HFenz​ ,

You can for now find HERE a python script example (not an entire project, but could be seen as a basis to start before a full Python project routine) containing some code lines to be used as example for generating a decision tree with Python, through the scikit package. The scripts are available both as Jupyter notebook (.ipynb) and as common Python scripts (.py). The example shows how to generate a decision tree file (dectree.txt) starting from an ARFF file (test.arff).

-Eleon

Hi @Eleon BORLINI​ ,

Any update on the tool-free script/code to MLC process a decision tree to a UCF file?

And is there any detailed MLC UCF documentation with worked examples like the UCF examples in AN5273 "LSM6DSOX: Finite State Machine" (section 8)?

Thanks,

Brendon

Hi Brendon @Community member​ ,

finally we could be close to make open the (already) available scripts, as you can see from this thread from last webinar.

Please look for updates on ST GitHub webpage.

-Eleon