Repository navigation
How to adapt the code for varied input feature dimensions #450
Unanswered
lilytong20
asked this question in
Q&A
Replies: 4 comments 4 replies
|
What is the exact error message?
Does the error occur when fitting the model, or during prediction?
|
1 reply
|
The feature matrix needs to have 2 dimension.
An input with shape n_sample x (n_feature x 100) would work.
|
1 reply
|
I'm note sure what you mean with n_sample x (100 x n_feature).
I probably should have written the shape as n_sample x (100 * n_feature)
A single sample (row) needs to be a 1D vector. I can't be a 2D matrix.
|
1 reply
|
What I mean is that you need to flatten your 100 x n_features 2D matrix
into 1D vector of length 100 * n_features.
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have a dataset, where one input feature is a vector for each subject (i.e., more than one number per person per feature), other features are normal scaler input features (i.e., one number per subject per feature). I'd want to try svm-, gradient boosted- and tree-based models for this data.
However, when trying to input the single vector feature for each subject (dependent variable y is in the right format), there were errors on input dimensions or converting to python scalars, which were from some codes checking X shape. In source code, it says the input X matrix should be n_sample x n_feature, guess this is designed for scaler features by default at the beginning?
My Q is: if it's feasible to modify the input feature X dimensions, so the svm- and tree-based models of this toolbox will still work?
Any suggestions will be appreciated.
Thanks a lot.
All reactions