machine learning - Weka WrapperSubsetEval only return class attribute as selected features -


i try use wrappersubseteval feature selection in weka. seems work return class attribute selected features. please help, thanks!

weka.attributeselection.attributeselection attsel = new weka.attributeselection.attributeselection();

        wrappersubseteval eval = new wrappersubseteval();         bestfirst search = new bestfirst();         string[]  optionssearch = null;         string[]  optionseval = null;         string[] optionsbase = null;         try {             optionssearch = weka.core.utils.splitoptions("-d 1 -n 5");             search.setoptions(optionssearch);                libsvm base = new libsvm();             optionsbase = weka.core.utils.splitoptions("-s 4");             base.setoptions(optionsbase);              optionseval = weka.core.utils.splitoptions("");             eval.setoptions(optionseval);             eval.setclassifier(base);             eval.setfolds(5);              attsel.setevaluator(eval);             attsel.setsearch(search);             datatrain.setclassindex(datatrain.numattributes() -1);             attsel.selectattributes(datatrain);             idx.add( attsel.selectedattributes() );         } catch (exception e) {             // todo auto-generated catch block             e.printstacktrace();         } 


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -