-
Notifications
You must be signed in to change notification settings - Fork 390
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
Skorch forwarding data columns as kwargs when using gridsearchcv #1043
Comments
Here is the error stack trace: |
when it runs the command @ skorch/net.py on line: 1182: then later on it merges this and feeds it as kwargs to the forward function. starting with the conditional on line 1518
Since X is a mapping due to the transformation earlier, it merges and fits and uses the module **dict version instead of the version that forwards x |
Using to_numpy on the pandas objects and a different scoring method name doesn't trigger this, which is very strange. |
Indeed, when you pass a pandas
When you pass a numpy array instead of a df, we don't encounter the aforementioned problem, which is why it works. Note, however, that this may not be what you want. For instance, if the df contains categorical data, you surely don't want to treat it like just numerical data. We have a helper class that takes care of some of this: |
Working with the data in this link: https://www.kaggle.com/datasets/uciml/breast-cancer-wisconsin-data
I am able to run this:
When I try to run this I get an error:
TypeError: MyNeuralNetwork.forward() got an unexpected keyword argument 'radius_mean'
It should be forwarding this in as x, not using each column by name. (these are pandas dataframes or series, for X and Y)
The text was updated successfully, but these errors were encountered: