java - Weka J48 changing option - no difference -
java - Weka J48 changing option - no difference -
i trying alter options j48 classifier, makes no difference in resulted tree.
my code:
j48 cls = new j48(); instances info = new instances(new bufferedreader(new filereader("somearfffile"))); data.setclassindex(data.numattributes() - 1); //was trying utilize -m 1 , -m 5, no difference string[] options = new string[1]; options[0] = "-c 1.0 –m 1"; cls.setoptions(options); cls.buildclassifier(data); //displaying j48 tree treevisualizer tv = new treevisualizer(null,cls.graph(),new placenode2());
after set value method working fine.
cls.setminnumobj(5);
any ideas how can utilize setoptions method instead of setminnumobj?
the problem how seek set options. options
array should args
array in main
method, 1 string per element:
string[] options = {"-c", "1.0", "–m", "1"}; cls.setoptions(options);
otherwise won't work.
java weka
Comments
Post a Comment