Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
andresilvapimentel opened this issue Jan 15, 2024 · 0 comments

Comments

@andresilvapimentel
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant