-
Notifications
You must be signed in to change notification settings - Fork 116
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
[FEATURE] Run with given regressor instead of raising warning in ZeroInflatedRegressor #480
Comments
Just to confirm; can you varify that If so, the error makes sense to me. If there are no zeros on the dataset, the classifier in the meta-model can't train. |
And here are some of the y_train values:
PS: I am not saying the error is wrong or there is a bug, I am saying this should apply regression no matter what and it should be the user's decision. Maybe I am making a logical mistake here. If so, sorry to waste your time. |
The thing is that if there are only zero's in your y_train, there is no data left for the regressor to train on. We filter out all zero entries before passing the data to the regressor, as we don't want the zeros to bias the regressors prediction. There's no way the regressor component could still give results in that situation, hence the exception. I do kind of see that in your use-case, where you're doing multi-output regression, you kind of want to ignore that situation for a single column if that happens. Is that indeed your use-case? |
Exactly @MBrouns . And I think this should be an option given to the user. |
Ah, you're doing multi-output regression! Now I see. That seems valid and indeed the @DoDzilla-ai If we add a flag in the |
I'm thinking something along the lines of
|
Exactly. |
@DoDzilla-ai is this an issue you'd like to pick up? |
@koaning I wish I could, currently struggling with health issues :( |
No worries, health is more important. |
I am using the ZeroInflatedRegressor for the prediction of some materials' prices. For some materials I am getting this error:
Tbh. I didn't understand much from the error. But, I guess using the regressor (in my case this is LinearRegression from sklearn) could give me some results. Why ZeroInflatedRegressor can't use the regressor I defined for it but instead raising this error? I think there should be a flag (a parameter) in ZeroInflatedRegressor which would let it fit the regressor as suggested by the error message if the user wants. If not, it could still raise this error.
The text was updated successfully, but these errors were encountered: