I am trying to find varImp for the following model,
Linear Discriminant Analysis
50 samples 25 predictors 2 classes: 'L', 'Lpo'
No pre-processing Resampling: Leave-One-Out Cross-Validation Summary of sample sizes: 49, 49, 49, 49, 49, 49, ... Addtional sampling using SMOTE
Resampling results:
ROC Sens Spec
0.9433345 0.9439082 0.8942777
caret::varImp(result$models[[2]], scale = TRUE)
Is there an easy fix for this error:
Error in y - mean(y, rm.na = TRUE): non-numeric argument to binary operator
Traceback:
1. caret::varImp(result$models[[2]], scale = TRUE)
2. varImp.train(result$models[[2]], scale = TRUE)
3. filterVarImp(x_dat, y_dat, nonpara = nonpara, ...)
4. apply(x, 2, testFunc, y = y)
5. FUN(newX[, i], ...)
result$models[[2]]
is. It would be much easier if you posted a reproducible example with an inbuilt data set. – missuseIris
orSonar
and post a minimal example that reproduces the error. – missuse