lda analysis with cv -syntax?

train_control <- trainControl(method = "cv",number = 10)
model <- train(y ~ x1+x2+x3+x4+x5+x6, data=df,
+ method = "lda",
+ trControl = train_control)
Error: wrong model type for regression

what is the correct syntax?

The syntax appears correct if you are trying to do LDA classification.

I suspect that the issue is that y is not a factor.

Thanks . Your are correct.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.