Inconsistencies between GUI and Java code

Ulrich Mayring <[email protected]> Tue, 21 Nov 2023 17:48:45 +0100
Newsgroups gmane.comp.ai.weka
Message-ID <[email protected]>
Hi everyone,

I am getting inconsistencies when trying to reproduce a result obtained 
via the Weka GUI with Java code. I am using the same ARFF file for the 
GUI and my Java code. It is a file of roughly 5.5MB, which contains 18 
attributes and a class attribute.

I use no filters, however, the ARFF file is already normalised. I am 
using the Multilayer Perceptron for classification in its default 
settings except that I add some hidden layers (9, 15, 6).

The GUI shows me this command line:
weka.classifiers.functions.MultilayerPerceptron -L 0.3 -M 0.2 -N 500 -V 
0 -S 0 -E 20 -H "9, 15, 6"

My Java code:
weka.classifiers.functions.MultilayerPerceptron classifier = new 
weka.classifiers.functions.MultilayerPerceptron();
classifier.setHiddenLayers("9, 15, 6");

The evaluation results for both methods are different!

My Java code runs about 3.5 minutes and reports an accuracy of 74.3% and 
the size of the model, when saved to a file, is 40054 Bytes.

The Weka GUI runs about 8.5 minutes and reports an accuracy of 75.9% and 
the size of the model is 41715 KByte.

These results in terms of accuracy, model size in bytes and running time 
are reproducible on repeated runs.

What could cause these differences?

_______________________________________________
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