Discussion:
Beginner Question : Running Weka using a DOS bat file
peter leonard
2003-09-26 22:46:59 UTC
Permalink
Hi
I am trying to run several experiments using Weka via a batch file. I'm
using Windows XP with Weka 3-2. The GUI works fine but I need to run many
variations of the same experiment. I've created a bat file named
"Weka_peter.bat" as a test with the following lines :

SET CLASSPATH=C:\Program Files\Weka-3-2\weka.jar
java weka.classifiers.rules.ZeroR -t weather.arff

I saved the bat file C:\Program Files\Weka-3-2\. When I run the bat file
from the command prompt, I receive the following result :



C:\Program Files\Weka-3-2>weka_peter.bat

C:\Program Files\Weka-3-2>SET CLASSPATH=C:\Program Files\Weka-3-2\weka.jar

C:\Program Files\Weka-3-2>java weka.classifiers.rules.ZeroR -t weather.arff
Exception in thread "main" java.lang.NoClassDefFoundError:
weka/classifiers/rule
s/ZeroR
C:\Program Files\Weka-3-2>


I checked the CLASSPATH with SET and it seems fine :

CLASSPATH=C:\Program Files\Weka-3-2\weka.jar


Can someone please help.

Thanks
Peter

_________________________________________________________________
Frustrated with dial-up? Get high-speed for as low as $29.95/month
(depending on the local service providers in your area).
https://broadband.msn.com
peter leonard
2003-09-27 17:59:02 UTC
Permalink
Hi,
I just figured it out.

set CLASSPATH=C:\Program Files\Weka-3-2\weka.jar
java weka.classifiers.ZeroR -t C:\Progra~1\Weka-3-2\data\iris.arff


I needed to omit 'rules' when I referenced the classifier. The command line
documention for the CLI uses the following format :

java weka.classifiers.rules.ZeroR -t weather.arff


For interest, does anyone know why "rules" is needed in one and not the
other.


Regards
Peter

============================================




Hi
I am trying to run several experiments using Weka via a batch file. I'm
using Windows XP with Weka 3-2. The GUI works fine but I need to run many
variations of the same experiment. I've created a bat file named
"Weka_peter.bat" as a test with the following lines :

SET CLASSPATH=C:\Program Files\Weka-3-2\weka.jar
java weka.classifiers.rules.ZeroR -t weather.arff

I saved the bat file C:\Program Files\Weka-3-2\. When I run the bat file
from the command prompt, I receive the following result :



C:\Program Files\Weka-3-2>weka_peter.bat

C:\Program Files\Weka-3-2>SET CLASSPATH=C:\Program Files\Weka-3-2\weka.jar

C:\Program Files\Weka-3-2>java weka.classifiers.rules.ZeroR -t weather.arff
Exception in thread "main" java.lang.NoClassDefFoundError:
weka/classifiers/rule
s/ZeroR
C:\Program Files\Weka-3-2>


I checked the CLASSPATH with SET and it seems fine :

CLASSPATH=C:\Program Files\Weka-3-2\weka.jar


Can someone please help.

Thanks
Peter

_________________________________________________________________
High-speed Internet access as low as $29.95/month (depending on the local
service providers in your area). Click here. https://broadband.msn.com
Richard Kirkby
2003-09-28 21:59:15 UTC
Permalink
Post by peter leonard
For interest, does anyone know why "rules" is needed in one and not the
other.
Regards
Peter
The classifiers were repackaged in the development version of WEKA
(version 3.3.1 onwards). For versions earlier than this the rules
package did not exist.

Richard
--
peter leonard
2003-10-01 03:10:20 UTC
Permalink
Thanks for the clarification. I just learned that this is documented in Dr.
Alex K. Seewald's tutorial on the Weka main page.

Regards
Peter
Subject: Re: [Wekalist] re : Beginner Question : Running Weka using a DOS
bat file
Date: Mon, 29 Sep 2003 09:59:15 +1200
Post by peter leonard
For interest, does anyone know why "rules" is needed in one and not the
other.
Regards
Peter
The classifiers were repackaged in the development version of WEKA
(version 3.3.1 onwards). For versions earlier than this the rules
package did not exist.
Richard
--
_________________________________________________________________
Share your photos without swamping your Inbox. Get Hotmail Extra Storage
today! http://join.msn.com/?PAGE=features/es

Loading...