Re: MISMO Classifier: cannot evaluate Model
Peter Reutemann <[email protected]> Mon, 15 Jan 2024 08:49:59 +1300
| Newsgroups | gmane.comp.ai.weka |
|---|---|
| Message-ID | <CAHoQ12Jj4ZhJG5x1euuE2Syib3nzzr_VCwPO_YF=80POp6=+eQ@mail.gmail.com> |
> I've been using the MISMO classifier with multi instance data and while > I can create the classifier (after putting "test=false" in > $HOME/wekafiles/props/Capabilities.props), I am getting the following > error message, when I evaluate the created model: > > java.lang.IllegalStateException: All class values in a bag must be the > same! New value: ? > at > weka.filters.unsupervised.attribute.PropositionalToMultiInstance.batchFinished(PropositionalToMultiInstance.java:575) > at weka.filters.Filter.useFilter(Filter.java:708) > at weka.classifiers.mi.MISMO.distributionForInstance(MISMO.java:1375) > at > weka.classifiers.evaluation.Evaluation.evaluationForSingleInstance(Evaluation.java:2208) > at > weka.classifiers.evaluation.Evaluation.evaluateModelOnceAndRecordPrediction(Evaluation.java:2246) > at > weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:2122) > at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:689) > > I have checked my data and created a minimal example of it, but it > appears that the class value is correct: in my case it's either true or > false and appears at the end of each ARFF file line. I don't really > understand what the error message even means. A bag consists of: > > bagId,'value1,value2\nvalue3,value4',true > > So how could there be different class values in a bag? It's always the > third argument on the line and can only appear once. Can you confirm that train and test set are compatible? You can use the "Instances.equalHeadersMsg" method for that: https://weka.sourceforge.io/doc.dev/weka/core/Instances.html#equalHeadersMsg-weka.core.Instances- Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, Hamilton, NZ Mobile +64 22 190 2375 https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ _______________________________________________ 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