Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Can we use micromlgen with xgboost itself - without XGBClassifier #7

Open
karimkhanvi opened this issue May 31, 2021 · 0 comments
Open

Comments

@karimkhanvi
Copy link

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 xgboost as xgb
model = xgb.cv(param,dtrain,num_boost_round=420,nfold=10,stratified=True,verbose_eval=20)
model = xgb.train(param,dtrain,420,[(dtrain,'train')],verbose_eval=20)

I tried using port on model, which gives me error

Traceback (most recent call last):
  File "model_microml_training.py", line 161, in <module>
    predict(sys.argv[1])
  File "model_microml_training.py", line 151, in predict
    print(port(model))
  File "/home/admin/dawid_venv_xgboost_1.1.0/lib/python3.5/site-packages/micromlgen/micromlgen.py", line 45, in port
    raise TypeError('clf MUST be one of %s' % ', '.join(platforms.ALLOWED_CLASSIFIERS))
TypeError: clf MUST be one of SVC, OneClassSVC, RVC, SEFR, DecisionTree, RandomForest, GaussianNB, LogisticRegression, PCA, PrincipalFFT, LinearRegression, XGBClassifier
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant