dinesh k | 2 May 2004 13:39
Picon
Favicon

help needed in compiling the decision tree code...

hi wekaians,
 
iam dinsh. iam new to this data mining area. i have downloaded the source code from the site.
i could not able to compile the decision tree and assosciation algorithms.
the errors iam getting are could not the various imported packages.
iam running these algorithms under windows environment..
do i need to change the class path.? if any?
could anyone please tell me how to get rid of the problems that i have been encountering ...
 
i will be very thankful to u...  
 
waiting for the reply.....

Yahoo! India Matrimony: Find your partner online.

_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
ozturk | 3 May 2004 10:26
Picon

Text processing with WEKA

Dear All,

I would like to engage WEKA (decision tree j48 mainly) in a phrase break
detection algorithm but I could not formulate how to make it, i.e, I have
a stream of words/sentences and a number of properties belonging to this
stream. I also have the locations of the phrase breaks for training. The
problem is I could not figure out how to formulate such a thing. I have
previously used decision trees in more concrete examples but now I am
stucked.

Any suggestions would be greatly appreciated,

Thanks,

Ozlem OZTURK
Daniel Facciolo Pires | 3 May 2004 16:13

getting correctly classified instances

Hi,

I am working with a J48() classifier.

I am building an instance of J48, but I cannot get the number and percent of correctly/incorrect classified instances. Does anyone know how to get it ? 

other question: the tree generated by my java program is different from the tree generated from Weka program ???????

private static J48 m_Classifier = new J48();

m_Classifier.setConfidenceFactor(0.25f);
m_Classifier.setMinNumObj(2);  
m_Classifier.setNumFolds(10);
FileReader fr = new FileReader(nomeArquivo);
m_Data = new Instances(fr);
m_Data.setClassIndex(m_Data.numAttributes() - 1);
m_Filter.inputFormat(m_Data);
Instances filteredData = Filter.useFilter(m_Data, m_Filter);

m_Classifier.buildClassifier(filteredData);
      
??????????????????????????

Thanks a lot in advance

 
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
fmartine | 3 May 2004 16:58
Picon
Favicon

(no subject)

hello everybody...

recently i saw somebody asked about some way to apply a model generated
from some training data, to new data for which the class atribute is
unknown. I never saw an answer. I would like to know if someone knows a way
to do this.
It would be very useful for my investigation, otherwise i would have to
develop some tool to do that for me.

Thanks in advance.

          Fabricio Martínez
Norberto | 3 May 2004 18:51
Picon
Picon
Favicon

RE: getting correctly classified instances

Hi,
 
To get the number correctly/incorrect classified instances you can use the class weka.classifiers.evaluation.For example:
 
    m_Evaluation=new Evaluation(m_Data);
    m_Evaluation.crossValidateModel(m_Classifier,m_Data,10);
    m_Evaluation.correct(); // or m_Evaluation.incorrect();
-----Mensaje original-----
De: wekalist-bounces <at> list.scms.waikato.ac.nz [mailto:wekalist-bounces <at> list.scms.waikato.ac.nz] En nombre de Daniel Facciolo Pires
Enviado el: lunes, 03 de mayo de 2004 16:13
Para: wekalist <at> list.scms.waikato.ac.nz
Asunto: [Wekalist] getting correctly classified instances

Hi,

I am working with a J48() classifier.

I am building an instance of J48, but I cannot get the number and percent of correctly/incorrect classified instances. Does anyone know how to get it ? 

other question: the tree generated by my java program is different from the tree generated from Weka program ???????

private static J48 m_Classifier = new J48();

m_Classifier.setConfidenceFactor(0.25f);
m_Classifier.setMinNumObj(2);  
m_Classifier.setNumFolds(10);
FileReader fr = new FileReader(nomeArquivo);
m_Data = new Instances(fr);
m_Data.setClassIndex(m_Data.numAttributes() - 1);
m_Filter.inputFormat(m_Data);
Instances filteredData = Filter.useFilter(m_Data, m_Filter);

m_Classifier.buildClassifier(filteredData);
      
??????????????????????????

Thanks a lot in advance

 

_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Abid Muslim Malik | 3 May 2004 22:19
Picon
Picon

importing weka packages


hi ;

 I am building a classsifier for my work. Its in a separate directory.I am
importing all the packages and also setting the CLASSPATH as well. The
problem is that when I compile my java file, it doesnot find the packages.
I am attaching the file as well which show the errors.

Thanks
Abid M. Malik

javac sched.java
sched.java:1: package weka.core does not exist
import weka.core.*;
^
sched.java:2: package weka.classifiers does not exist
import weka.classifiers.*;
^
sched.java:3: package weka.filters does not exist
import weka.filters.*;
^
sched.java:11: cannot resolve symbol
symbol  : class Instances 
location: class sched
private Instances m_Data =null;
        ^
sched.java:13: cannot resolve symbol
symbol  : class Filter 
location: class sched
private Filter m_Filter= new DiscretizeFilter();
        ^
sched.java:15: cannot resolve symbol
symbol  : class classifier 
location: class sched
private classifier m_Classifier = new IBK();
        ^
sched.java:13: cannot resolve symbol
symbol  : class DiscretizeFilter 
location: class sched
private Filter m_Filter= new DiscretizeFilter();
                             ^
sched.java:15: cannot resolve symbol
symbol  : class IBK 
location: class sched
private classifier m_Classifier = new IBK();
                                      ^
8 errors
make: *** [sched.class] Error 1
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Ling Zhuang | 4 May 2004 02:24
Picon
Favicon

Weka exception: nominal value not declared in header, read Token[null], line 6185


Hello, everyone

I am doing text mining at the moment. I have preprocessed the document set 
from Web-KB project using the standard TF*IDF scheme and output the result 
to an .arff file. However, when I apply J48 to my data, it gives me this 
exception: Weka exception: nominal value not declared in header, read 
Token[null], line 6185. I have used my text preprocessing program on some 
other data set to produce the .arff files and it seems they are perfectly 
fine. I can not figure out what the problem is. Also what does the 
exception mean anyway?? I check the file and it is just as the same as the 
other one.

I really appreciate your help.

Thank you.

Ling
Ashraf Kibriya | 4 May 2004 02:45
Picon
Picon

RE: importing weka packages

What does your class path look like? Try putting the path for weka 
packages in front of the others. For example, if your weka exists in 
/home/mydir/weka, then your class path should look something like:
/home/mydir:<rest of the paths>

Hope this helps.

Kind Regards,
Ashraf
Yue Pan | 4 May 2004 06:57
Picon
Favicon

Weka's SVM parameter tuning

Hello,

SVM minimizes the sum of  ||W|| + u||S|| to maximize the margin. The u
is the weighting factor for slack variable S (with respect to weight
vector W). Does anyone know what parameter such weighting factor u
corresponds to in Weka's implementation of SVM (e.g. SMO, SMOreg)? I'd
like to tune such parameter to see how it affects the learning.

If there is no such a parameter in the implementation, any ways to
balance the importance of minimizing the weight vector W and slack
variable vector S in  Weka?

If anyone knows that such tuning has been taken care of interanlly (i.e.
user worry-free), please let me know too.

thanks for any suggestion in advance.

Yue
Charles R. Twardy | 4 May 2004 09:35
Picon
Picon
Favicon

Re: (no subject)

One way is to make them one data set, train the learner on the first part,
and test it on the second.

Another is to use the "Model" method. This will learn (and return) a model
on the whole original dataset. To run that model on another dataset, you
may need to write a dummy learner whose "BuildClassifier" method just
reads in the model.

We wrote a StaticBN learner that does that -- takes a Bayesian network
from a file and applies it to your incoming data.  As a degenerate case
I wrote one that doesn't learn anything, but returns the true class (when
known) during testing. (That's useful for checking that you're calculating
evaluation metrics properly, but not much else.)

	-Charles

>recently i saw somebody asked about some way to apply a model generated
>from some training data, to new data for which the class atribute is
>unknown. I never saw an answer. I would like to know if someone knows a
>way to do this. It would be very useful for my investigation, otherwise i
>would have to develop some tool to do that for me.

--

-- 
Charles R. Twardy                    www.csse.monash.edu.au/~ctwardy
Monash University                    sarbayes.org
Computer Sci. & Software Eng.        +61(3) 9905 5823 (w)  5146 (fax)

Allow the president to invade a neighboring nation, whenever he shall
deem it necessary to repel an invasion, ...  and you allow him to make
war at pleasure.                               --Abraham Lincoln

Gmane