Forward selection with Random forest: error

1 visualizzazione (ultimi 30 giorni)
Sowmya MR
Sowmya MR il 23 Feb 2018
I am trying to run below code for feature selection using Random forest in matlab but it gives me some error. Can someone help me fix it?
rng(10)
c = cvpartition(Ytrain,'k',10);
opts = statset('display','iter');
fun = @(xtrain,ytrain,xtest,ytest) sum(ytest ~= predict(TreeBagger(500,xtrain,ytrain),xtest));
[fs,history] = sequentialfs(fun,Xtrain,Ytrain,'cv',c,'options',opts, 'direction', 'forward');
The function '@(xtrain,ytrain,xtest,ytest)sum(ytest~=predict(TreeBagger(500,xtrain,ytrain),xtest))' generated the
following error:
Undefined function 'ne' for input arguments of type 'cell'.

Risposte (0)

Categorie

Scopri di più su Signal Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by