Thamar Solorio | 1 Mar 2005 02:07
Picon
Favicon

How does J48 handles string attributes?

Hello,
I have been looking for information on how does J48 handles string 
attributes. It seems that J48 is not able to handle string attributes 
unless one uses the reduced-error pruning, instead of  C4.5 pruning. 
Can  any of you help me understand why this happens? I know how each 
type of pruning works (I read it on the Data Mining book), but that 
doesn't help me understand why string attributes can be handled only in 
reduced-error pruning.

Thanks in advance!

Thamar Solorio
Nick | 1 Mar 2005 01:07
Picon
Favicon

Trouble connecting to a MySQL 4.1.10 database using Weka 3.4.3

Has anyone successfully connected to a MySQL database through Weka 3.4.3
explorer?

I have spent a tremendous amount of time trying to connect to my MySQL
database.  I have searched the mailing list and it appears many people have
had this problem but no one has seemed to give a satisfactory answer on how
to solve their problem.  Here's what is going on.

I can load the MySQL driver, org.gjt.mm.mysql.Driver.  
I start the Weka GUI from the command line by typing java
weka.gui.GUIChooser.  I can also run the explorer directly with java
weka.gui.explorer.Explorer (but I get the same errors).
I click on the Explorer button and I see that the driver is loaded in the
command window.  I proceed to click the Open DB button.  My
jdbc:mysql://localhost:3306/test is loaded from the Databaseutils.props
file.  I fill in the rest of the fields, specifically query, username, and
password fields and have sparseData set to false.
I click ok and I get the following result.

Couldn't read from database: null

Also, the command prompt window where the java application is running from
has the following output.

C:\>java weka.gui.GUIChooser
Loaded driver: org.gjt.mm.mysql.Driver
Connecting to jdbc:mysql://localhost:3306/test
GenericObjectEditor: Problem making backup object
java.io.NotSerializableException: com.mysql.jdbc.Connection
Executing query: SELECT * from person
(Continue reading)

Peter Reutemann | 1 Mar 2005 02:56
Picon
Picon
Favicon

Re: Trouble connecting to a MySQL 4.1.10 database using Weka 3.4.3

> Has anyone successfully connected to a MySQL database through Weka 3.4.3
> explorer?

Yep! Works fine for me, with 3.23.x (connector version 2.0.14) and 4.1.y 
(connector version 3.1.6).

> I have spent a tremendous amount of time trying to connect to my MySQL
> database.  I have searched the mailing list and it appears many people have
> had this problem but no one has seemed to give a satisfactory answer on how
> to solve their problem.  Here's what is going on.
> 
> I can load the MySQL driver, org.gjt.mm.mysql.Driver.  
> I start the Weka GUI from the command line by typing java
> weka.gui.GUIChooser.  I can also run the explorer directly with java
> weka.gui.explorer.Explorer (but I get the same errors).
> I click on the Explorer button and I see that the driver is loaded in the
> command window.  I proceed to click the Open DB button.  My
> jdbc:mysql://localhost:3306/test is loaded from the Databaseutils.props
> file.  I fill in the rest of the fields, specifically query, username, and
> password fields and have sparseData set to false.
> I click ok and I get the following result.
> 
> Couldn't read from database: null

If you get a CVS snapshot this (, I'll have to admit, quite) 
unsatisfying error message is replaced with the content of the 
exception. In case that a mapping of a datatype is missing, it will then 
show up (it's then easy to modify the props-file).

Here you'll find how to get a copy from the CVS ("Weka via CVS"):
(Continue reading)

Qinghua Song | 1 Mar 2005 06:01
Picon
Favicon

How to save prediction into a file

Hi everyone,
 I haven't used weka for a long time. Now I need to install it and use it
again. First, I use the command which I used about 8 months ago
 % java weka.classifiers.j48.J48 -t Data01.arff -T Test0.arff -U
 But it doesn't work, then I correct it to
 % java weka.classifiers.trees.J48 -t Data01.arff -T Test0.arff -U

Then it works. That is a good news. But I got bad news. I want to save the
prediction into a file, and 8 months ago, I used
 % java weka.classifiers.j48.J48 -t Data01.arff -T Test0.arff -U -p >
Data01.out
  Obviously, that didn't work now. So I changed it to
 % java weka.classifiers.trees.J48 -t Data01.arff -T Test0.arff -U -p >
Data01.out

  I expected this work, but it didn't. Can you help me out on this?
 Thank you very much.
  Qinghua

-------------------------------------------------
Qinghua Song
Department of Statistics, UW-Madison
Medical Science Center, 1300 University Ave.
Madison, WI, 53706
Office phone:(608)-263-5948
Peter Reutemann | 1 Mar 2005 07:58
Picon
Picon
Favicon

Re: How to save prediction into a file

> I want to save the
> prediction into a file, and 8 months ago, I used
>  % java weka.classifiers.j48.J48 -t Data01.arff -T Test0.arff -U -p >
> Data01.out
>   Obviously, that didn't work now. So I changed it to
>  % java weka.classifiers.trees.J48 -t Data01.arff -T Test0.arff -U -p >
> Data01.out
> 
>   I expected this work, but it didn't. Can you help me out on this?

If you run "java weka.classifiers.trees.J48 -h" you'll get this output 
for the "-p" option:
   -p <attribute range>
         Only outputs predictions for test instances, along with
         attributes (0 for none).

If you don't want any attributes output then use "0" and in your case:
% java weka.classifiers.trees.J48 -t Data01.arff -T Test0.arff -U -p 0 > 
  Data01.out

Cheers, Peter

--

-- 
Peter Reutemann, Dept. of Computer Science, University of Waikato
Phone +64 (7) 838-4466 Ext. 8766
Pierre Marie OUM SACK | 1 Mar 2005 11:30
Picon

Using weka in my c/c++ code

Hi Every body,

I want to know if It is possible to use weka in my C/C++. If yes how can 
I do It ? Any information about will be helfull for my work.

Thankssssssssss !

--

-- 
Best Regards,
Pierre Marie.
________________________________________________

Pierre Marie OUM OUM SACK               

Laboratoire d'Informatique du Littoral       
Maison de la Recherche Blaise Pascal        
50,  Rue Ferdinand Buisson - BP 179        
62228 CALAIS Cedex FRANCE 

Tel : (+33)  03 21 46 57 50                       
Fax: (+33)  03 21 46 57 51 

web : http://lil.univ-littoral.fr/~oumoumsack    
_______________________________________________
Picon
Favicon

Re: [Norton AntiSpam] Using weka in my c/c++ code

Hi

Via Excelsior JET one can convert Java package into a Windows DLL. Thus a
Weka.dll can be called and used from C\C++ at least from MVC++. What JET
does is an optimized conversion via Java Native Interface (JNI) which
defines the Java engine. You can use the JNI yourself in order to run Java
(weka) from C programs but this is complicated.

Regards
Hans van Rijnberk
AV

At 11:30 1/3/05 +0100, Pierre Marie OUM SACK wrote:
>Hi Every body,
>
>I want to know if It is possible to use weka in my C/C++. If yes how can 
>I do It ? Any information about will be helfull for my work.
>
>Thankssssssssss !
>
>-- 
>Best Regards,
>Pierre Marie.
>________________________________________________
>                                                                   
>Pierre Marie OUM OUM SACK               
>                                                                    
>Laboratoire d'Informatique du Littoral       
>Maison de la Recherche Blaise Pascal        
>50,  Rue Ferdinand Buisson - BP 179        
(Continue reading)

Ashwin Srinivasan | 1 Mar 2005 13:04
Picon

Attribute Selection from the Command Line


Hi,
        I am a complete novice at calling Weka from the command line, so I am sure these will be somewhat trivial questions.  I need to run a PCA for dimensionality reduction. My questions are:

1. How do I call PCA from the command line?

2.  Are there other attribute selection methods within Weka (supervised and unsupervised) that have been found to perform better?

3. If "yes" to (2) then, could someone help with their command line invocation?


Many thanks,
Ashwin
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Diego García Morate | 1 Mar 2005 14:48
Picon

Re: [Norton AntiSpam] Using weka in my c/c++ code

Hi,

Another solution could it be call weka from the command line, most of
the methods implemented in Weka have this ability.

Regards,
Diego García Morate

> 
> On Tue, 01 Mar 2005 12:15:48 +0100, Hans van Rijnberk , Assort Vision,
> Utrecht <JRijnberk <at> wanadoo.nl> wrote:
> > Hi
> >
> > Via Excelsior JET one can convert Java package into a Windows DLL. Thus a
> > Weka.dll can be called and used from C\C++ at least from MVC++. What JET
> > does is an optimized conversion via Java Native Interface (JNI) which
> > defines the Java engine. You can use the JNI yourself in order to run Java
> > (weka) from C programs but this is complicated.
> >
> > Regards
> > Hans van Rijnberk
> > AV
> >
> >
> > At 11:30 1/3/05 +0100, Pierre Marie OUM SACK wrote:
> > >Hi Every body,
> > >
> > >I want to know if It is possible to use weka in my C/C++. If yes how can
> > >I do It ? Any information about will be helfull for my work.
> > >
> > >Thankssssssssss !
> > >
> > >--
> > >Best Regards,
> > >Pierre Marie.
> > >________________________________________________
> > >
> > >Pierre Marie OUM OUM SACK
> > >
> > >Laboratoire d'Informatique du Littoral
> > >Maison de la Recherche Blaise Pascal
> > >50,  Rue Ferdinand Buisson - BP 179
> > >62228 CALAIS Cedex FRANCE
> > >
> > >Tel : (+33)  03 21 46 57 50
> > >Fax: (+33)  03 21 46 57 51
> > >
> > >web : http://lil.univ-littoral.fr/~oumoumsack
> > >_______________________________________________
> > >
> > >
> > >_______________________________________________
> > >Wekalist mailing list
> > >Wekalist <at> list.scms.waikato.ac.nz
> > >https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> > >
> > >
> >
> > Hans van Rijnberk
> >
> > JRijnberk <at> wanadoo.nl
> >
> >
> > _______________________________________________
> > Wekalist mailing list
> > Wekalist <at> list.scms.waikato.ac.nz
> > https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> >
> 
> --
> Diego García Morate
> 

--

-- 
Diego García Morate
Abdulrahman Almuhareb | 1 Mar 2005 17:16
Picon
Favicon

J48 prediction bug when using the GUI interface (WEKA 3.4)

Hello all,
 
This is to report a prediction bug for the J48 algorithm when using the GUI interface in WEKA 3.4. The predictions that you get when using the command prompt are fine.
 
I use two ways to get the prediction when using the explorer window, and both produce some incorrect predictions:
 
1. By selecting more option then selecting "output predictions" option.

2. From the result list I select visualize classifier errors and save the data file from the "Weka Classifier Visualize" window.
 
Also, when using (1) above, you get incorrect "instance numbers" (inst#).
 
Example:
 
 Assume the following sub-tree:

=======================
cluster = 4
|   dixon = DV
|   |   xofx <= 51.08: a (28.0)
|   |   xofx > 51.08: q (8.0/2.0)
=======================
- What is the prediction for the instance that has (cluster=4, dixon=DV, xofx = 5)?
-- Weka prediction will be correct all the times (class "a"). But see the next case.

- What is the prediction for the instance that has (cluster=4, dixon=DV, xofx = 100)?
-- Weka will sometimes predict the class "q" and sometimes will predict the class "a". But the correct prediction is "q" all the times.
 
Regards,
 
Abdulrahman.
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist

Gmane