Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upError when using the sampling parameter (SMOTE-ROSE) and few predictors #612
Comments
|
If a preProcess option is added to train, I get the following error: Code:
Error:
|
|
I think the error is in these functions:
If you call one of those functions with x = data.frame with 1 column, you will get a list with x as a numeric vector, when it should be a data.frame with 1 column. That's why in later phases like preProcessing, x does not have column names (is not a dataframe). |
|
It looks like both
This can be "hotfixed" with:
I would try to prepare a pull request, but I am scared to break something... |
|
You diagnosis is correct. I'll create fixes in the next day or two and a new CRAN release should happen within a week or so. Thanks |
|
Please test... |
|
It works on some simple examples, I tried. Should a relevant unit-test be added? :D |
|
Yep! Thanks. I'm aiming to get coverage about 20% =] |
I'm currently getting an error when I use SMOTE or ROSE to train an unbalanced dataset with few columns. It happens with different algorithms (glm, avNNet, parRf..), so is not about an specific model implementation. I don't know if it has to do with the way SMOTE and ROSE behaves with few columns.
Example:
Error:
If I try to do the sampling AFTER the preProcessing, I get the same error.
Another important thing is that I don't get the error with up and down.