micromlgen icon indicating copy to clipboard operation
micromlgen copied to clipboard

Generate C code for microcontrollers from Python's sklearn classifiers

Results 13 micromlgen issues
Sort by recently updated
recently updated
newest added

Im having trouble to get code generated based on SVC to work. attahced example work nice in python but not on mcu.. on mcu it always give 0. Attached files...

Hello, I train the One Class SVC in Python and port it to C++ as follows: import micromlgen from micromlgen import port classmap = { -1: 'Fault', 1: 'No fault'...

Hi, I train my SVC in Python and port it to C++ as follows: ` with open(fname, "w") as f: f.write(port(clf)) ` However, the decision function computed by `clf.decision_function(X)` (in...

As the title says, the XGboost port code uses a temporary file in APPDATA/LOCAL to create a temporary json file. There is no info about this provided to the user....

https://github.com/eloquentarduino/micromlgen/blob/3bf7d57f0181112790ff1efaa86f610f8afed4de/micromlgen/templates/logisticregression/vote.arduino.jinja#L2

Hi, I'm using XGBClassifier and getting this error: ~/anaconda3/envs/kando/lib/python3.8/site-packages/micromlgen/templates/xgboost/xgboost.jinja in block 'predict'() 4 float votes[{{ n_classes }}] = { 0.0f }; 5 ----> 6 {% for k, tree in f.enumerate(trees)...

Hello, and congratulations for your work. I've used random forest and SVC on complex datasets and work like a charm, on the other hand I didn't manage to get either...

enhancement

micromlgen works well with XGBClassifier. Which is imported from xgboost. `from xgboost import XGBClassifier ` But in my program, I am using `xgboost` without any importa like this ``` import...

Hello, I'm sorry if this isn't the way to do this, I am a bit new to Github. I found a few bugs, and I fixed them in my own...

File "train_XGDBoost.py", line 415, in exportModel cppCode = port(clf, classmap=classmap) File "/home/andreas/.local/lib/python3.6/site-packages/micromlgen/micromlgen.py", line 44, in port return port_xgboost(**locals(), **kwargs) File "/home/andreas/.local/lib/python3.6/site-packages/micromlgen/xgboost.py", line 41, in port_xgboost }, **kwargs) File "/home/andreas/.local/lib/python3.6/site-packages/micromlgen/utils.py", line...

bug