The Evaluation is, just like the name suggests, for evaluating a
classifier's performance. Whatever model is being generated is not
important.
Once you have train a classifier you can simply evaluate it on the tests set:
# create classifier object
jrip = Classifier(classname="weka.classifiers.rules.JRip")
# generate train/test split
train, test = labor_data.train_test_split(70.0, None)
# build classifier
jrip.build_classifier(train)
# evaluate on test set
evl = Evaluation(test)
evl.test_model(jrip, test)
print(evl.summary())
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/