Re: Filter dataset by column value Wrapper Python

Peter Reutemann <[email protected]>
Newsgroups gmane.comp.ai.weka
Message-ID <[email protected]>
Excerpt from my email with the code example:

"ATTx with x being 1-based index"

The class attribute in the iris dataset is the 5th.

What index is your attribute?

Cheers, Peter

On October 29, 2021 9:22:01 PM GMT+13:00, [email protected] wrote:
>You were right, it was the attribute location. 
>
>Now, I get an error from this line:
>
>subdata = f.filter(data)
>
>The error is: 
>JavaException: Variable 'ATT5' is undefined! 
>
>this is the part of the code:
>Filter(classname="weka.filters.unsupervised.instance.SubsetByExpression",
>           options=["-E", "ATT5 is '%s'" % val])
>    f.inputformat(data)
>
>I want to filter by the variable "vehicle_id", it goes from 0 to 2453. I've checked the iris.arff and none ATT5 is defined.
>_______________________________________________
>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

--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 858-5174 (office)
+64 (7) 577-5304 (home office)
http://www.cms.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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.