SuperLearner Error in R - Object 'All' not found

305 views Asked by At

I am trying to fit a model with the SuperLearner package. However, I can't even get past the stage of playing with the package to get comfortable with it.... I use the following code:

superlearner<-SuperLearner::SuperLearner(Y=y, X=as.data.frame(data_train[1:30]), family =binomial(), SL.library = list("SL.glmnet"), obsWeights = weights)

y is a numeric vector of the same length as my dataframe "data_train", containing the correct labels with 9 different classes. The dataframe "data_train" contains 30 columns with numeric data.

When i run this, i get the Error:

Error in get(library$screenAlgorithm[s], envir = env) : 
  Objekt 'All' not found

I don't really know what the problem could be and i can't really wrap my head around the source code. Please note that the variable obsWeights in the function contains a numeric vector of the same length as my data with weights i calculated for the model. This shouldn't be the problem, as it doesn't work either way.

Unfortunately i can't really share my data on here, but maybe someone had this error before...

Thanks!

1

There are 1 answers

0
user3357659 On

this seems to happen if you do not attach SuperLearner, you can fix via library(SuperLearner)