So right now I am trying to create multiple variables with training data, and in the process I have reached an error
Error in eval(predvars, data, env) : object '1.band1' not found
which is a product of these lines:
for(i in 1:length(data_split)){
assign(paste("fit.lda",i, sep = ""), train(class~., data=data_split[i],
method="lda", metric=metric, trControl=control))}
is it something that I did wrong or is it something that can be fixed with another methodology
EDIT: My dataset is a data frame which was created by the following lines
validation_index <- createDataPartition(valuetable$class, p=0.80, list=FALSE)
dataset <- valuetable[validation_index,]
where valuetable
is a dataframe which containes the values of multiple rasters.
Now, I wanted to split my data so my train function can be processed faster, that is because my machine's specs are pretty low, thus allowing me to re-create the later the results that would take time using other methods.
Let me know if you want more clarification.
data_split
? Is it alist
containing the data subsets? $\endgroup$