Open KerenHalperin opened 3 years ago
It looks like n_classes
is 0. What dataset are you trying to classify?
It's a binary classification problem, y- is a series of 1/0, x- dataframe with 40 features. Do you have an example of using micromlgen with xgboost? perhaps that would help me. Using SVC for example, works for me.
Xgboost is the same as any other classifier from the micromlgen perspective. I remember having troubles with binary classification with xgboost, too. Can you please try a different dataset with more than 2 classes? I'm sure it will work.
If this is the case and you need a "fast" solution, ry to create a "dummy" class to your dataset.
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) %} 7 {% with i = 0, class_idx = k % n_classes %} 8 // tree #{{ k + 1 }}
ZeroDivisionError: integer division or modulo by zero Can you please explain why this is happening?