cross-validation in Attribute Selection Mode

30 views
Skip to first unread message

Mosaic Han

unread,
Feb 27, 2023, 9:27:59 AM2/27/23
to python-weka-wrapper
In the "Select attributes" tag of the Weka Explorer (GUI), there are two options under the "Attribute Selection Mode", i.e. (i) Use full training set; (ii) Cross-validation

I think the code shown on https://fracpete.github.io/python-weka-wrapper/api.html
>>> search = ASSearch(classname="weka.attributeSelection.BestFirst", options=["-D", "1", "-N", "5"])
>>> evaluator = ASEvaluation(classname="weka.attributeSelection.CfsSubsetEval", options=["-P", "1", "-E", "1"])
>>> attsel = AttributeSelection()
>>> attsel.search(search)
>>> attsel.evaluator(evaluator)
>>> attsel.select_attributes(data)

fits for the full training set, i.e. option (i). How can I modify the above for the cross-validation mode in attribute selection. At the same time, how could I display the outcome too?
Any help is greatly appreciated.

Peter Reutemann

unread,
Feb 27, 2023, 2:46:45 PM2/27/23
to python-we...@googlegroups.com

Mosaic Han

unread,
Feb 28, 2023, 8:40:00 AM2/28/23
to python-weka-wrapper

Again, good pointer.
The example shown is quite useful and explains all.
Thanks
Reply all
Reply to author
Forward
0 new messages