Mark Hall | 1 Feb 2011 08:21
Favicon

Re: using weka's generated rules in java

On 01/29/2011 06:27 AM, Radek Chudziak wrote:
> How to use rules generated by weka's classifier NNGE in my java code?
>
> For example the rules generated by the classifier are as follows:
>
> Rules generated :
> class closed IF : 19.0<=Time<=24.0  (109)
> class open IF : Time=18.0  (9)
> class closed IF : 15.0<=Time<=17.0  (60)
> class closed IF : 13.0<=Time<=14.0  (31)
> class open IF : Time=12.0  (11)
> class closed IF : 10.0<=Time<=11.0  (40)
> class open IF : Time=9.0  (9)
> class closed IF : 1.0<=Time<=8.0  (149)
>
> I want to use these rules in my java code where I want to check whether
> a given input matches the above rules.
> Can somebody please help me with that. I know you can serialise the
> model in weka but how to use these particular rules.

Why not just load the serialized model and call classifyInstance() or 
distributionForInstance() in order to make predictions? Otherwise you'll 
have to parse the output and test the value of "Time" against each rule 
to see if it matches.

Cheers,
Mark

_______________________________________________
Wekalist mailing list
(Continue reading)

Mark Hall | 1 Feb 2011 08:24
Favicon

Re: why do i always get the same accuracy in weka svm?

On 01/29/2011 07:23 AM, wiznoy wrote:
>
> There are a total of 271 instances and 179 attributes in my data.
>
> i used single random attribute for classification. it always yields the same
> accuracy 78.5978 .
> i also tried to randomly select 15 attributes and stangely enough also
> always yields the same accuracy 78.5978
>
> summary is also always the same.
>
> is there something wrong with my data or is this really possible? how can i
> explain these results.

Perhaps it is not possible to improve on predicting the majority class 
in your data? What is the accuracy of ZeroR?

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Mark Hall | 1 Feb 2011 08:37
Favicon

Re: Difference between Training and Testing

On 01/29/2011 07:19 PM, saumrh wrote:
>
> Hi,
>     I am trying to apply SMOTE filter and pass on the results to AdaBoost.
> However, since smote increases minority class instances, SMOTE+AdaBoost
> should happen only on Training set. But when i debugged the code i found
> code flow of AdaBoost to be identical regardless whether 'training' or
> 'testing' is being done.

I'm not too sure what you mean by it being identical - buildClassifier() 
is called for the training data and 
classifyInstance()/distributionForInstance() is called for each test 
instance.

The correct way to use filters with a classifier is to use the 
FilteredClassifier. This wraps a filter and a classifier and ensures 
that any "learning" that a filter might do only happens only on training 
data. In the case of SMOTE, once batchFinished() is called (as it is 
after processing the training data) any instances input to the filter 
via input() are simply pushed through unaltered.

So is the code that differentiates between training
> and testing higher up in the hierarchy or something, because i am unable to
> locate it. Also how and where is tree or rules formed by weka on training
> stored so that they can be used during testing?

Each classifier stores the structure it learns internally in various 
data structures. To use a classifier for prediction at a later stage you 
can serialize the model to a file. This can then be deserialized at a 
later stage and classifyInstance()/distributionForInstance() called in 
(Continue reading)

EiriniNtoutsi | 1 Feb 2011 11:16
Picon
Favicon

Re: Using MOA from Java code: how to pass parameters


Thank you very much Albert,
It worked fine!

All the best,
Eirini

Albert Bifet wrote:
> 
> Hi Eirini,
> 
>> How can I set the parameters of the algorithm from my code, like for
>> example
>> the number of clusters k?
> 
> There are two ways:
> 
> - using the option class of the parameter:
> 
> clusterer.numClustersOption.setValue(4);
> 
> - using a string to set up the parameter values as you do on the command
> line:
> 
> clusterer.getOptions().setViaCLIString("-k 4");
> 
> You have to set the options before calling prepareForUse(). This is an
> example:
> 
> StreamKM  clusterer = new StreamKM();
(Continue reading)

Laura Cannas | 1 Feb 2011 11:33
Picon

GeneticSearch.java

Hi Weka users!

Starting from http://weka.wikispaces.com/Subversion, I need to find the code relative to the class GeneticSearch.java
While I am able to find this class in the folder attributeSelection (/tags/stable-3-6-4/weka/src/main/java/weka/attributeSelection) in the old versions of Weka, I can't find it in the version 3-7.

Has it been moved to the folder:
/trunk/weka/src/main/java/weka/classifiers/bayes/net/search/global ? Why? Is there a specific reason?

Finally, the code of genetic search has been modified in the latest versions? Where can I find a description of 1. when it has been modified and 2. how?
I need to be sure that the genetic search works in the same way both in weka  3-6 and 3-7.

Thank you all in advance

Laura



Prima di stampare questa pagina verifica che sia necessario. Proteggiamo l'ambiente / Please consider the environment before printing this e-mail.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Christophe Salperwyck | 1 Feb 2011 11:37
Picon

Re: GeneticSearch.java

Hi Laura,

You can have a look in the package directory in subversion.
http://weka.sourceforge.net/packageMetaData/

Wait for the Guru for more details :-)

Best,
Christophe

2011/2/1 Laura Cannas <lauramcannas <at> gmail.com>:
> Hi Weka users!
>
> Starting from http://weka.wikispaces.com/Subversion, I need to find the code
> relative to the class GeneticSearch.java
> While I am able to find this class in the folder attributeSelection
> (/tags/stable-3-6-4/weka/src/main/java/weka/attributeSelection) in the old
> versions of Weka, I can't find it in the version 3-7.
>
> Has it been moved to the
> folder:/trunk/weka/src/main/java/weka/classifiers/bayes/net/search/global ?
> Why? Is there a specific reason?
>
> Finally, the code of genetic search has been modified in the latest
> versions? Where can I find a description of 1. when it has been modified and
> 2. how?
> I need to be sure that the genetic search works in the same way both in
> weka  3-6 and 3-7.
>
> Thank you all in advance
>
> Laura
>
>
>
> Prima di stampare questa pagina verifica che sia necessario. Proteggiamo
> l'ambiente / Please consider the environment before printing this e-mail.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
> List info and subscription status:
> https://list.scms.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: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Pablo Bermejo | 1 Feb 2011 14:08
Picon
Favicon

WekaPackageManager

Hello,
I am trying to add a package to weka following the instructions in the weka wiki:
http://weka.wikispaces.com/How+are+packages+structured+for+the+package+management+system%3F

but after running the command
java -weka.core.WekaPackageManager -install-packagee mypackage.zip
and of messages on screen are printed with no error,

i check the installation with the "-list-packages installed" options but my package is not  present.

Thank you in advanced,
Pablo.





--
Dr. Pablo Bermejo
Research Assistant
University of Castilla-La Mancha
Edificio I3A - Campus Universitario
Albacete (Spain) C.P.: 02071

Tel: +34 967 599200 Ext: 2676
Web:www.dsi.uclm.es/personal/PabloBermejo
E-mail:Pablo.Bermejo <at> uclm.es
_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
மஞ்சுளா | 1 Feb 2011 14:41
Picon

attribute selection

I need to do attribute selection in high dimensional dataset.
Which attribute selector in weka can be used while doing unsupervised learning ie.clustering
THANKS IN ADVANCE

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Laura Cannas | 1 Feb 2011 15:48
Picon

Re: GeneticSearch.java



On 1 February 2011 11:37, Christophe Salperwyck <christophe.salperwyck <at> gmail.com> wrote:
Hi Laura,

You can have a look in the package directory in subversion.
http://weka.sourceforge.net/packageMetaData/

Wait for the Guru for more details :-)

Best,
Christophe


Thank you Christophe! :)

 

2011/2/1 Laura Cannas <lauramcannas <at> gmail.com>:
> Hi Weka users!
>
> Starting from http://weka.wikispaces.com/Subversion, I need to find the code
> relative to the class GeneticSearch.java
> While I am able to find this class in the folder attributeSelection
> (/tags/stable-3-6-4/weka/src/main/java/weka/attributeSelection) in the old
> versions of Weka, I can't find it in the version 3-7.
>
> Has it been moved to the
> folder:/trunk/weka/src/main/java/weka/classifiers/bayes/net/search/global ?
> Why? Is there a specific reason?
>
> Finally, the code of genetic search has been modified in the latest
> versions? Where can I find a description of 1. when it has been modified and
> 2. how?
> I need to be sure that the genetic search works in the same way both in
> weka  3-6 and 3-7.
>
> Thank you all in advance
>
> Laura
>
>
>
> Prima di stampare questa pagina verifica che sia necessario. Proteggiamo
> l'ambiente / Please consider the environment before printing this e-mail.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
> List info and subscription status:
> https://list.scms.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: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html



--
Prima di stampare questa pagina verifica che sia necessario. Proteggiamo l'ambiente / Please consider the environment before printing this e-mail.
_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
fahad shah | 1 Feb 2011 18:23
Picon

error reading back csv file saved using weka explorer

hi i generated a csv file using weka and i have troube reading it back in with weka! (usong explorer)
it has 2062 columns and i checked out file in excel and notepad and it seems fine but weka says
wrong number of columns read, expected 155 read 2062 and i tried the csv loader in weka (it was
there as a suggestion with the error dialog) and it also failed with same error, can someone help with this
thanks fahad

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Gmane