Re: BVDecompose Error
Michael Hall <[email protected]>
| Newsgroups | gmane.comp.ai.weka |
|---|---|
| Message-ID | <[email protected]> |
> On Jul 20, 2021, at 2:04 PM, Peter Reutemann <[email protected]> wrote: > > The setClassIndex method of BVDecompose uaes a 1-based index, not 0-based: > > https://weka.sourceforge.io/doc.dev/weka/classifiers/BVDecompose.html#setClassIndex-int- <https://weka.sourceforge.io/doc.dev/weka/classifiers/BVDecompose.html#setClassIndex-int-> > > Cheers, Peter > > > data.setClassIndex(data.numAttributes() - 1); > > RandomForest rf = new RandomForest(); > rf.setNumIterations(100); > rf.setMaxDepth(0); > rf.buildClassifier(data); > > > bv.setClassIndex(data.numAttributes() - 1); > bv.setClassifier(rf); I think you could probably get rid of the bv.setClassIndex(). The error changed for me anyhow. I think it was this one. /usr/libexec/java_home -v 1.8 --exec java -cp .:/Applications/weka-3-9-5/weka.jar RF Truthiness.arff NaN 1.0 0 Exception in thread "main" java.lang.IllegalArgumentException: Illegal Capacity: -2147483648 at java.util.Vector.<init>(Vector.java:136) at java.util.Vector.<init>(Vector.java:151) at weka.classifiers.BVDecomposeSegCVSub.decompose(BVDecomposeSegCVSub.java:758) at RF.<init>(RF.java:40) at RF.main(RF.java:46) The setClassIndex was already done for the RandomForest classifier that you in turn included in the BVDecomposeSetCVSub? I assume maybe my error is due to some parameter you included CLI that the code doesn’t or that the quick arff data I threw together wasn’t good enough. It did show the class attribute as Nominal in Explorer. _______________________________________________ Wekalist mailing list -- [email protected] Send posts to [email protected] To unsubscribe send an email to [email protected] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html