Weka filter removeuseless issue
i am doing a classification with weka, i tried to use the
filter.removeuseless, but with the same arff file, i found some
differences betweeen using that in the code and in the gui. In the code i
invoked it in this way:
Normalize norm = new Normalize();
norm.setInputFormat(train);
Instances train_norm = Filter.useFilter(train, norm);
RemoveUseless ru = new RemoveUseless();
ru.setInputFormat(train_norm);
Instances train_new = Filter.useFilter(train_norm, ru);
Ranker rank = new Ranker();
InfoGainAttributeEval eval = new InfoGainAttributeEval();
eval.buildEvaluator(train_new);
The result is "strange" because the filter deleted a lot of attributes
which the gui kept as informative for the classification. (The filter in
the gui worked very well). What is the problem? Am i using it well in the
code?
No comments:
Post a Comment