I have to transfer my trained model to iOS app, so I used coremltools to do it.
the loading model part and converting part are as following.
with open(filepath,'rb') as f:
rfc = joblib.load(f)
coreml_model=coremltools.converters.sklearn.convert(rfc, X_columns, Y_columns)
and I got this error code.
NameError: name '_tree' is not defined
I have checked the type of rfc, and it show "sklearn.ensemble._forest.RandomForestClassifier"
I have tried to lower my sklearn version to 0.19 ( right now is 0.24 ), but my model would face another problems, plus I cannot run the training code.
so, how can I fix this problem without downgrading my sklearn version?