Hoffman2:WEKA: Difference between revisions

From Center for Cognitive Neuroscience
Jump to navigation Jump to search
m (moved How to run WEKA on Hoffman to Hoffman2:WEKA: Restructuring)
No edit summary
Line 1: Line 1:
[[Hoffman2|Back to all things Hoffman2]]
WEKA is a machine learning program built by the Kiwis down in New Zealand.  It has an extensive library of machine learning algorithms.
==WEKA==
==WEKA==
===Getting Started with WEKA===
===Getting Started with WEKA===
Introductory material and full manuals can be found [http://www.cs.waikato.ac.nz/ml/weka/index_documentation.html here].
Introductory material and full manuals can be found [http://www.cs.waikato.ac.nz/ml/weka/index_documentation.html here].


There are sample data sets that can be found on Hoffman2 at:
There are sample data sets that can be found on Hoffman2 at
<code><pre>/u/home/FMRI/apps/current/data</pre></code>
/u/home/FMRI/apps/weka/current/data
and most of these are used in the introductory materials.
and most of these are used in the introductory materials.


=== GUI ===
=== GUI ===
To run the WEKA GUI from Hoffman2
To run the WEKA GUI from Hoffman2
<ol>
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]] making sure you have X11 forwarding enabled ("-X" flag)
<li>Make sure that you enabled X11 forwarding by including the -Y flag in your SSH command: <br />
# [[Hoffman2:Interactive Sessions|Check out an interactive computing node]]
<code><pre> $ ssh -Y joebruin@hoffman2.idre.ucla.edu </pre></code>
# Run the command
</li>
$ java -jar /u/home/FMRI/apps/weka/current/weka.jar
<li> Request an [http://www.ats.ucla.edu/clusters/hoffman2/computing/sge_qrsh.htm interactive node] to run on with the following command: <br />
# And the current version of WEKA should start up and the GUI will appear.
<code><pre> $ qrsh -l i </pre></code>
</li>
<li> Wait for the new node to appear.  Your prompt will change from: <br />
<code><pre> [joebruin@login4 ~] $ </pre></code>
to something like <br />
<code><pre> [joebruin@n1234 ~] $ </pre></code>
</li>
<li>Run the command:
<code><pre> $ java -jar /u/home/FMRI/apps/weka/current/weka.jar </pre></code>
And the current version of WEKA should start up and the GUI will appear.
</li>
</ol>
 


=== Command Line ===
=== Command Line ===
Calling any of the usual WEKA command line tools will work in submitted jobs so long as you properly reference the WEKA jar file at: <br />
Calling any of the usual WEKA command line tools will work in submitted jobs so long as you properly reference the WEKA jar file at:
<code><pre>/u/home/FMRI/apps/weka/current/weka.jar</pre></code>
/u/home/FMRI/apps/weka/current/weka.jar
A sample command would be<br />
A sample command would be
<code><pre>$ java -Xmx2g -cp /u/home/FMRI/apps/weka/current/weka.jar weka.classifiers.functions.SMO -o -t awesome_train_file.arff -T awesome_test_file.arff</pre></code>
$ java -Xmx2g -cp /u/home/FMRI/apps/weka/current/weka.jar weka.classifiers.functions.SMO -o -t awesome_train_file.arff -T awesome_test_file.arff
where
where
;-Xmx2g
;-Xmx2g
Line 44: Line 37:
:is an optional testing file for the model
:is an optional testing file for the model
:if this option is not provided, 10 fold cross validation will be done using Training data
:if this option is not provided, 10 fold cross validation will be done using Training data


== Massive Online Analysis (MOA) ==
== Massive Online Analysis (MOA) ==
MOA is an extension of WEKA to help with larger datasets.
===GUI===
===GUI===
To run the MOA GUI from Hoffman2
To run the MOA GUI from Hoffman2
<ol>
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]] making sure you have X11 forwarding enabled ("-X" flag)
<li>Make sure that you enabled X11 forwarding by including the -Y flag in your SSH command: <br />
# [[Hoffman2:Interactive Sessions|Check out an interactive computing node]]
<code><pre> $ ssh -Y joebruin@hoffman2.idre.ucla.edu </pre></code>
# Run the command
</li>
$ moa.sh
<li> Request an [http://www.ats.ucla.edu/clusters/hoffman2/computing/sge_qrsh.htm interactive node] to run on with the following command: <br />
# The current version of MOA should start up and the GUI will appear.
<code><pre> $ qrsh -l i </pre></code>
</li>
<li> Wait for the new node to appear.  Your prompt will change from: <br />
<code><pre> [joebruin@login4 ~] $ </pre></code>
to something like <br />
<code><pre> [joebruin@n1234 ~] $ </pre></code>
</li>
<li>Run the command:
<code><pre> $ moa.sh </pre></code>
And the current version of MOA should start up and the GUI will appear.
</li>
</ol>
 


===Command Line===
===Command Line===
Calling any of the usual MOA command line tools will work in submitted jobs so long as you properly reference the MOA jar file at: <br />
Calling any of the usual MOA command line tools will work in submitted jobs so long as you properly reference the MOA jar file at:
<code><pre>/u/home/FMRI/apps/weka/current/weka.jar</pre></code>
/u/home/FMRI/apps/weka/current/weka.jar
A sample command would be<br />
A sample command would be
<code><pre>$ java -Xmx4g -cp /u/home/FMRI/apps/moa/current/moa.jar -javaagent:sizeofag.jar moa.DoTask "EvaluatePrequential -l HoeffdingTree -i 1000000 -w 10000" </pre></code>
$ java -Xmx4g -cp /u/home/FMRI/apps/moa/current/moa.jar -javaagent:sizeofag.jar moa.DoTask "EvaluatePrequential -l HoeffdingTree -i 1000000 -w 10000"  
where
where
;-Xmx4g
;-Xmx4g
Line 78: Line 62:
; EvaluatePrequential -l HoeffdingTree -i 1000000 -w 10000
; EvaluatePrequential -l HoeffdingTree -i 1000000 -w 10000
:is the MOA command to execute
:is the MOA command to execute
==External Links==
*[http://www.cs.waikato.ac.nz/ml/weka/ Official WEKA page]
*[http://moa.cs.waikato.ac.nz/details/ Official MOA page]

Revision as of 01:54, 13 April 2012

Back to all things Hoffman2

WEKA is a machine learning program built by the Kiwis down in New Zealand. It has an extensive library of machine learning algorithms.


WEKA

Getting Started with WEKA

Introductory material and full manuals can be found here.

There are sample data sets that can be found on Hoffman2 at

/u/home/FMRI/apps/weka/current/data

and most of these are used in the introductory materials.

GUI

To run the WEKA GUI from Hoffman2

  1. SSH into Hoffman2 making sure you have X11 forwarding enabled ("-X" flag)
  2. Check out an interactive computing node
  3. Run the command
$ java -jar /u/home/FMRI/apps/weka/current/weka.jar
  1. And the current version of WEKA should start up and the GUI will appear.

Command Line

Calling any of the usual WEKA command line tools will work in submitted jobs so long as you properly reference the WEKA jar file at:

/u/home/FMRI/apps/weka/current/weka.jar

A sample command would be

$ java -Xmx2g -cp /u/home/FMRI/apps/weka/current/weka.jar weka.classifiers.functions.SMO -o -t awesome_train_file.arff -T awesome_test_file.arff

where

-Xmx2g
calls for 2GB of memory
-Xmx256m calls for 256MB of memory
-o
suppresses the model output
-t awesome_train_file.arff
specifies the training file
-T awesome_test_file.arff
is an optional testing file for the model
if this option is not provided, 10 fold cross validation will be done using Training data


Massive Online Analysis (MOA)

MOA is an extension of WEKA to help with larger datasets.

GUI

To run the MOA GUI from Hoffman2

  1. SSH into Hoffman2 making sure you have X11 forwarding enabled ("-X" flag)
  2. Check out an interactive computing node
  3. Run the command
$ moa.sh
  1. The current version of MOA should start up and the GUI will appear.

Command Line

Calling any of the usual MOA command line tools will work in submitted jobs so long as you properly reference the MOA jar file at:

/u/home/FMRI/apps/weka/current/weka.jar

A sample command would be

$ java -Xmx4g -cp /u/home/FMRI/apps/moa/current/moa.jar -javaagent:sizeofag.jar moa.DoTask "EvaluatePrequential -l HoeffdingTree -i 1000000 -w 10000" 

where

-Xmx4g
calls for 4GB of memory
-Xmx256m calls for 256MB of memory
EvaluatePrequential -l HoeffdingTree -i 1000000 -w 10000
is the MOA command to execute


External Links