Closed stolzkc closed 6 years ago
Do you have a small example showing the error? SL.glmnet should work with either a matrix of a data.frame. If you have X as a data.frame, then the SL.glmnet
code will convert it to a matrix using model.matrix
, you might need something similar with SL.polymars
. My first guess is your data.frame includes some numeric and character variables, is that correct?
Thank you for your answer. It turns out it was incorrect dataframe. I didn't find what exactly is wrong. It's all works after writing dataframe to csv and read from it. Moreover, comparison of pre-written and post-written frames gives me no difference. I need to look more. I'll keep you posted. Thanks again!
Changing read_csv to standard read.csv to load train set solved the problem.
I use this list of methods: c("SL.glmnet", "SL.gam", "SL.randomForest", "SL.polymars", "SL.knn")
And call SL something like
Where type of X is data.frame. The problem is: glmnet is required X to be a data.frame. polymars required X to be data.matrix
You can create and launch single learner for each of them (glmnet and polymars) to see what's going on.