且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SVM-RFE算法在R中的实现

更新时间:2023-02-18 12:08:39

好像只有一个要素仍然保留时,矩阵就会转换为列表.试试这个:

Looks like your matrix gets converted into a list when only one feature remains. Try this:

svmModel = SVM(as.matrix(x[, survivingFeaturesIndexes]), y, C = 10, cache_size=500,kernel="linear" )