fundamental question about instance's ID

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fundamental question about instance's ID

Tang, Wei
Hi,

How can we keep track of some special instances if we shuffle the
dataset? Is there any facility like instance's ID available in Weka? Or
if I keep the instance's ID as an attribute, how can I filter it out
before feed it into any classifier?

Thanks for your reply.


_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: fundamental question about instance's ID

Peter Reutemann
> How can we keep track of some special instances if we shuffle the
> dataset? Is there any facility like instance's ID available in Weka?

There's no such as an instance ID. You could store references to the
instances in an array and then search for it, but that works only as
long as there are no copies created (and therefore new references) of
these instances.

> Or
> if I keep the instance's ID as an attribute, how can I filter it out
> before feed it into any classifier?

You can use the following filter for removing the ID attribute:
        weka.filters.unsupervised.attribute.Remove

Check out the Javadoc or the commandline help for more information of
how to use this filter (you'll probably need the setAttributeIndices or
setAttributeIndicesArray method).

HTH

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/     +64 (7) 838-4466 Ext. 5174

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: fundamental question about instance's ID

Eibe Frank
In reply to this post by Tang, Wei
The way to do this is to have an extra attribute in the data that
represents the ID. Then you can use the FilteredClassifier in
conjunction with the unsupervised.attribute.Remove filter to apply
another classifier to the data while preserving the ID attribute.

Cheers,
Eibe



On Jul 12, 2005, at 3:30 PM, Tang, Wei wrote:

> Hi,
>
> How can we keep track of some special instances if we shuffle the
> dataset? Is there any facility like instance's ID available in Weka? Or
> if I keep the instance's ID as an attribute, how can I filter it out
> before feed it into any classifier?
>
> Thanks for your reply.
>
>
> _______________________________________________
> Wekalist mailing list
> [hidden email]
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist


_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist