Which attributes does a classifier use?

View: New views
4 Messages — Rating Filter:   Alert me  

Which attributes does a classifier use?

by Christoph Schmitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm currently building an application where I use Weka classifiers that
someone else has built and saved from the Weka GUI; i.e. I obtain
serialized Java objects that implement the Classifier interface and
classify Weka Instance objects with those. Now my problem is that I
don't get the instances from an ARFF file or something, but I build
Instance objects on demand from another data source. In order to do that
properly, I need to know which attributes the classifier expects (when
training the classifiers, each one may be using a different subset of a
potentially large set of attributes). Is there any way to do this?

I hope this does not sound too confusing ;-) To rephrase my question:
can I ask a Classifier object for the structure of the dataset (i.e. the
Instances object) that it was trained with?

Thanks and best regards,

Christoph


_______________________________________________
Wekalist mailing list
Wekalist@...
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist

Re: Which attributes does a classifier use?

by Peter Reutemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I'm currently building an application where I use Weka classifiers that
> someone else has built and saved from the Weka GUI; i.e. I obtain serialized
> Java objects that implement the Classifier interface and classify Weka
> Instance objects with those. Now my problem is that I don't get the
> instances from an ARFF file or something, but I build Instance objects on
> demand from another data source. In order to do that properly, I need to
> know which attributes the classifier expects (when training the classifiers,
> each one may be using a different subset of a potentially large set of
> attributes). Is there any way to do this?
>
> I hope this does not sound too confusing ;-) To rephrase my question: can I
> ask a Classifier object for the structure of the dataset (i.e. the Instances
> object) that it was trained with?

A classifier does not necessarily store the training header. But,
since you're receiving serialized objects that were generated by the
Weka Explorer, you can retrieve that data from the serialized data
stream. The Explorer stores the classifier object *and* then the
training header in the serialized file.

HTH

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

_______________________________________________
Wekalist mailing list
Wekalist@...
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist

Re: Which attributes does a classifier use?

by Christoph Schmitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks Peter, that is very good news ;-) Will try that at once.

Regards,
Christoph

On Thu, 3 Jul 2008 19:41:33 +1200, "Peter Reutemann"
<fracpete@...> wrote:
> A classifier does not necessarily store the training header. But,
> since you're receiving serialized objects that were generated by the
> Weka Explorer, you can retrieve that data from the serialized data
> stream. The Explorer stores the classifier object *and* then the
> training header in the serialized file.




_______________________________________________
Wekalist mailing list
Wekalist@...
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist

Re: Which attributes does a classifier use?

by Peter Reutemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> A classifier does not necessarily store the training header. But,
> since you're receiving serialized objects that were generated by the
> Weka Explorer, you can retrieve that data from the serialized data
> stream. The Explorer stores the classifier object *and* then the
> training header in the serialized file.

Only as a follow-up...

I've added a note to the "Serialization" WekaWiki article, of what
objects Weka serializes:
  http://weka.sourceforge.net/wiki/index.php/Serialization#Serialization_in_Weka

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

_______________________________________________
Wekalist mailing list
Wekalist@...
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
LightInTheBox - Buy quality products at wholesale price