weka.classifiers.trees.j48 Command Line

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

weka.classifiers.trees.j48 Command Line

Leandro Guimarães
Hello!
  I need to execute a J48 decision tree in a dataset. 

  One of the attributes in this dataset is numerical. Via the explorer I can user this numerical attribute since it's not the last leaf of the tree.

  Is that possible to do the same thing via command line? I couldn't find wich parameter to use to choose the attribute to be the last one in the tree.

  The command I'm using is:

 java -cp weka.jar weka.classifiers.trees.J48 -t file.arff

Thanks!
Leandro Guimarães


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: weka.classifiers.trees.j48 Command Line

Eibe Frank-3
The -c parameter is used to specify the class attribute (if that's what you mean).

For example, to use the first attribute as the class attribute, you would use:

java -cp weka.jar weka.Run .J48 -c 1 -t file.arff

If you run the classifier without any parameters, you get a list of the available options:

java -cp weka.jar weka.Run .J48

(I'm using weka.Run in these examples to reduce typing effort.)

Cheers,
Eibe

On Tue, Feb 20, 2018 at 6:18 AM, Leandro Guimarães <[hidden email]> wrote:
Hello!
  I need to execute a J48 decision tree in a dataset. 

  One of the attributes in this dataset is numerical. Via the explorer I can user this numerical attribute since it's not the last leaf of the tree.

  Is that possible to do the same thing via command line? I couldn't find wich parameter to use to choose the attribute to be the last one in the tree.

  The command I'm using is:

 java -cp weka.jar weka.classifiers.trees.J48 -t file.arff

Thanks!
Leandro Guimarães


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



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