command line usage / "percentage split"

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

command line usage / "percentage split"

Johanna Karlsson
Hi Peter,

Thanks! The classFirst tag and XML was just what we needed! We were using
3.4.3 and didn't see the XML options until we just upgraded. We wanted to
vary some parameters so we were looking for a command line (or XML file) way
to call Weka repeatedly from Perl.

There is one more followup question... We used the Experiment class because
we couldn't figure out another way to do holdout from the command line (even
though that option is in the Explorer). Doing so, we found the CSV output,
which is great (we were originally parsing the human-formatted text
output).. But we have another small problem.

We want to run a series of tests with J48 and a separate training and test
file (we're varying the confidence level for pruning). The data will go into
a chart, so CSV or database output would be easiest.

We can't find a way to give CSV output without using the Experiment class,
and we can't figure out how to do a separate training and test file if we do
use the Experiment class. That is to say, we can do EITHER CSV output or
separate training/test files, but not both. Do you happen to know if this is
possible? Either way, thanks for the help with the XML options!

JK

> -----Original Message-----
> From: Peter Reutemann [mailto:[hidden email]]
> Sent: Friday, May 13, 2005 6:30 PM
> To: Johanna Karlsson
> Cc: [hidden email]
> Subject: Re: [Wekalist] command line usage / "percentage split"
>
>
> > First, does anyone know is there a way to find the equivalent
> > command-line string for a given Weka Explorer setting: that
> is, is the
> > explorer emitting the command line somewhere that we could
> echo (and
> > possibly modify)?
>
> If you just want to run an experiment, try using the Experimenter
> instead of the Explorer. If you save/serialize it to XML you
> can easily
> edit it by hand. You can then run this experiment from the
> commandline
> with the Experiment-class.
>
> > Second, if anyone could help us tackle our specific
> problem, it seems
> > simple enough. We want to use holdout (66%) on J48 with
> confidence of,
> > say 0.015 and class attribute index 1 (not "last").
>
> In the XML file there's also an object-tag with the name attribute
> "classFirst". If you set this to true, you should be able to run your
> experiments.
>
> Hope that helps!
>
> Cheers, Peter
>
> --
> Peter Reutemann, Dept. of Computer Science, University of
> Waikato Phone +64 (7) 838-4466 Ext. 8766
>

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

Re: command line usage / "percentage split"

Peter Reutemann
> We want to run a series of tests with J48 and a separate training and test
> file (we're varying the confidence level for pruning). The data will go into
> a chart, so CSV or database output would be easiest.
>
> We can't find a way to give CSV output without using the Experiment class,
> and we can't figure out how to do a separate training and test file if we do
> use the Experiment class. That is to say, we can do EITHER CSV output or
> separate training/test files, but not both. Do you happen to know if this is
> possible? Either way, thanks for the help with the XML options!

Sorry, but I don't know any way to do this... But you can still write
your own classes that do exactly what you want, i.e. generating CSV output.

The relevant code in the Explorer can be found here:
- class: weka.gui.explorer.ClassifierPanel
- method: startClassifier()
- switch: case 4 - statements

Cheers, Peter

--
Peter Reutemann, Dept. of Computer Science, University of Waikato
Phone +64 (7) 838-4466 Ext. 8766

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

Re: command line usage / "percentage split"

Eibe Frank
There is one way to do this but it's not very nice...

You can append your test set to your training set and figure out what
percentage of the total constitutes the training set. Then you can do a
train/test split in the Experimenter. (Choose the option that leaves
the order of the instances unchanged).

Cheers,
Eibe

On May 14, 2005, at 5:03 PM, Peter Reutemann wrote:

>> We want to run a series of tests with J48 and a separate training and
>> test
>> file (we're varying the confidence level for pruning). The data will
>> go into
>> a chart, so CSV or database output would be easiest. We can't find a
>> way to give CSV output without using the Experiment class,
>> and we can't figure out how to do a separate training and test file
>> if we do
>> use the Experiment class. That is to say, we can do EITHER CSV output
>> or
>> separate training/test files, but not both. Do you happen to know if
>> this is
>> possible? Either way, thanks for the help with the XML options!
>
> Sorry, but I don't know any way to do this... But you can still write
> your own classes that do exactly what you want, i.e. generating CSV
> output.
>
> The relevant code in the Explorer can be found here:
> - class: weka.gui.explorer.ClassifierPanel
> - method: startClassifier()
> - switch: case 4 - statements
>
> Cheers, Peter
>
> --
> Peter Reutemann, Dept. of Computer Science, University of Waikato
> Phone +64 (7) 838-4466 Ext. 8766
>
> _______________________________________________
> 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
Loading...