[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wekalist
Subject:    Re: [Wekalist] How to change default base classifier for multiboostAB?
From:       Mark Hall <mhall () pentaho ! com>
Date:       2010-03-29 20:12:58
Message-ID: 4BB109CA.2040502 () pentaho ! com
[Download RAW message or body]

On 30/03/10 4:51 AM, phil mingo wrote:
> Hi, i'm trying to use MultiBoostAB via java in weka, and i wish to
> dynamically change from default base classifier (...DecisionStump) to
> any of my choice. How can i do this while programming via the
> ClassifierPanel? I already know how to do this via the command prompt,
> but i wish to use the already established classifier panel interface.
>
> That is, i wish to set the options of the classifier editor ...
> something like below:
>
> Object o
> = Class.forName("weka.classifiers.meta.MultiBoostAB").newInstance();
> OptionHandler oh = (OptionHandler) o;
> oh.setOptions( SomeOptionsArray );
> m_ClassifierEditor.setValue( oh );
>
>
> But this is not working ... still defaults to DecisionStump instead of
> the classifier in the SomeOptionsArray.
> Plz help. Im trying with this for 1 week now.

Take a look at the main() method in weka.gui.GenericObjectEditor. This has code 
to initialize the GenericObjectEditor with a class type and specific value to 
edit. You can verify that this works by running it from the command line, try:

java weka.gui.GenericObjectEditor weka.classifiers.Classifier 
weka.classifiers.bayes.NaiveBayes

This tells the GOE to edit objects of type Classifier and NaiveBayes in particular.

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic