Error in [.data.table(train.set, , input.columns) :
j (the 2nd argument inside [...]) is a single symbol but column name 'input.columns' is not found. Perhaps you intended DT[, ..input.columns]. This difference to data.frame is deliberate and explained in FAQ 1.1.
I intended for it to generate the models and store them in glm.model.list for each test_fold.
I'm not sure what to try at this point.
In the main branch code of this repository, the very last for loop
input.columns <- subset.with.autism.cols %>% select(-one_of(columns_to_exclude)) output.column <- one_hotted_data[["K2Q35A_1"]]
glm.model.list <- list() for(test_fold in 1:n.folds){ folded_data <- OneFold(input.columns, n.folds, test_fold) train.set <- folded_data[i = Set == "train"] train.inputs <- train.set[,input.columns] train.output <- train.set[,output.column] my.model.for.fold.k <- cv.glmnet(as.matrix(train.inputs), train.output) glm.model.list[[test_fold]] <- my.model.for.fold.k }
is returning the error
Error in
[.data.table
(train.set, , input.columns) : j (the 2nd argument inside [...]) is a single symbol but column name 'input.columns' is not found. Perhaps you intended DT[, ..input.columns]. This difference to data.frame is deliberate and explained in FAQ 1.1.I intended for it to generate the models and store them in glm.model.list for each test_fold. I'm not sure what to try at this point.