Re: MISMO Classifier: cannot evaluate Model

Ulrich Mayring <[email protected]> Sun, 21 Jan 2024 12:55:43 +0100
Newsgroups gmane.comp.ai.weka
Message-ID <[email protected]>
Hi Peter,

I was using cross-validation, but have now switched to train-test set 
and can confirm that the equalsHeaders method returns true between train 
and test set.

Kind regards,
Ulrich

Am 14.01.24 um 20:49 schrieb Peter Reutemann:
>> 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-


_______________________________________________
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