-
Notifications
You must be signed in to change notification settings - Fork 4
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
Better error message when predict()
is called with a Table
that already contains the target
#9
Labels
Comments
lars-reimann
added a commit
that referenced
this issue
Mar 24, 2023
### Summary of Changes This can also be accomplished by renaming columns in the returned table. If the input table already contains the column we want to predict, it's an indicator for #9, so we shouldn't just let people change the name here. --------- Co-authored-by: lars-reimann <[email protected]>
lars-reimann
pushed a commit
that referenced
this issue
Mar 26, 2023
## [0.4.0](v0.3.0...v0.4.0) (2023-03-26) ### Features * better names for properties of `TaggedTable` ([#74](#74)) ([fee398b](fee398b)) * change the name of a `Column` ([#76](#76)) ([ec539eb](ec539eb)) * metrics as methods of models ([#77](#77)) ([bc63693](bc63693)), closes [#64](#64) * optionally pass type to column ([#79](#79)) ([64aa429](64aa429)), closes [#78](#78) * remove `target_name` parameter of `predict` ([#70](#70)) ([b513454](b513454)), closes [#9](#9) * rename `tagged_table` parameter of `fit` to `training_set` ([#71](#71)) ([8655521](8655521)) * return `TaggedTable` from `predict` ([#73](#73)) ([5d5f5a6](5d5f5a6))
lars-reimann
changed the title
Easy to make error of not dropping to be predicted column before
Better error message when Mar 29, 2023
predict()
predict()
is called with a Table
that already contains the target
lars-reimann
added a commit
that referenced
this issue
Apr 2, 2023
lars-reimann
pushed a commit
that referenced
this issue
Apr 4, 2023
## [0.9.0](v0.8.0...v0.9.0) (2023-04-04) ### Features * container for images ([#159](#159)) ([ed7ae34](ed7ae34)), closes [#158](#158) * improve error handling for `predict` ([#145](#145)) ([a5ff11c](a5ff11c)), closes [#9](#9) * move `ImputerStrategy` to `safeds.data.tabular.typing` ([#174](#174)) ([205c8e2](205c8e2)) * rename `n_neighbors` to `number_of_neighbors` ([#162](#162)) ([526b96e](526b96e)) ### Bug Fixes * export `TableTransformer` and `InvertibleTableTransformer` ([#135](#135)) ([81c3695](81c3695))
🎉 This issue has been resolved in version 0.9.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe
It often occurs that a
predict()
call returns following error:PredictionError: Error occurred while predicting: X has 12 features, but RandomForestRegressor is expecting 11 features as input.
whenever you forget to drop the column that is to be predicted in the Table you're trying to predict on.
Desired solution
Catch that error and return a custom msg for the
PredictionError
in case it really is this particular column.The text was updated successfully, but these errors were encountered: