flennerhag / mlens

ML-Ensemble – high performance ensemble learning
http://ml-ensemble.com
MIT License
843 stars 108 forks source link

How to predict class labels in X and their probability estimates? #156

Open andresilvapimentel opened 8 months ago

andresilvapimentel commented 8 months ago

How can I predict class labels in X and their probability estimates using superlearner with the mlens library? I tried to use:

from mlens.ensemble import SuperLearner from mlens.ensemble.base import BaseEnsemble

make predictions on hold out set

yhat = ensemble.predict(X_val, proba=True) print('Super Learner: %.3f' % (accuracy_score(y_val, yhat) * 100)) yhat_proba = ensemble.predict_proba(X_val, proba=True) print(yhat_proba)

but it did not work at al.