caret train method not working (something is wrong for all accuracy results) for outcomes with >2 categories

前端 未结 4 558
自闭症患者
自闭症患者 2021-01-22 23:03

Hi I know someone asked similar issues before but no clear answer yet (or I tried their solution without success: Caret error using GBM, but not without caret Caret train method

4条回答
  •  抹茶落季
    2021-01-22 23:48

    Thank howaj for your post. That did work for the data I posted but somehow did not work for another dataset, where everything seems to be the same. But I figured out finally:

    Could be a syntax issue here. Instead of using train(y~., data=training, ...), I changed to the train(train$y,train$x, ...) without specifying data=.. explicitly:

    train(training[,!names(training)%in%response], training$response ...)
    

    This worked.

提交回复
热议问题