-
Notifications
You must be signed in to change notification settings - Fork 156
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
machines should check input shape #1023
Comments
While I agree the suggested behaviour would be an improvement, I'm not sure I'd characterise this as a bug. Also, it's actually quite difficult to implement because there is a tension with the desire for API genericity. Not all models consume tables, and some inputs don't even have a concept of columns (eg, MLJFlux.jl's ImageClassifier). So this means the responsibility for making these checks probably has to be left with individual model implementations of MLJModelInteface. We could add tooling to make this easier, and I would welcome that. But rolling it out to all models would be a substantial task. But perhaps I'm missing a simpler solution? |
I see. The first example, where As I mentioned in slack, I would like to help improve the combination of MLJ and DataFrames, as I think together they have potential for some really elegant workflows (even more so than status quo), so I would love to understand better what's happening here. I imagine at some point the input table is being consumed / transformed into a |
Most models that consume tabular input will convert it to a matrix inside their |
While I agree with you that |
when I train a machine on a (columns) subset of a dataframe, I can predict on the full dataframe but it will take the wrong columns. this should either 1. take the correct columns or 2. throw an error.
It also lets you predict on fewer columns than was trained on, which should certainly error.
Versions
0.19.1
The text was updated successfully, but these errors were encountered: