Weka can not generate source code for NaiveBayes method ???

276 views
Skip to first unread message

Hoang Pham

unread,
Mar 11, 2014, 12:41:38 PM3/11/14
to wekamooc...@googlegroups.com
I can not generate source code for NaiveBayes method but it's possible for J48, OneR ...

Fernando DM

unread,
Mar 11, 2014, 4:24:34 PM3/11/14
to wekamooc...@googlegroups.com
Hi Hoang, 
Could you give us a little more of information about the problem?.

Best Regards,

Ing. Fernando García
Data Mining Specialist

Hoang Pham

unread,
Mar 11, 2014, 11:17:48 PM3/11/14
to wekamooc...@googlegroups.com

I can not tick "output source code" when i run NaiveBayes method.



Vào 03:24:34 UTC+7 Thứ tư, ngày 12 tháng ba năm 2014, Fernando DM đã viết:

Sujit Pal

unread,
Mar 12, 2014, 3:20:11 PM3/12/14
to wekamooc...@googlegroups.com
J48 and OneR are both tree based classifiers. In such cases, its possible to build if-then-else source code that you can copy paste into your code. For Naive Bayes, the classification does not result in if-then-else source code. If you right click on the bottom left classification panel where it lists the name of the classifier, you will be prompted for a file name to save the serialized model for the classifier into. You can load this model back into your Java code using the recipe described in this Stack Overflow page:


-sujit

Fernando DM

unread,
Mar 12, 2014, 9:04:47 PM3/12/14
to wekamooc...@googlegroups.com
Hi Hoang, 
As Sujit mentioned, you can follow that option. 
As for your main question, I would like to answer by private, as this issue is not within the course topic.

Best Regards
Ing. Fernando García
Data Mining Specialist


El martes, 11 de marzo de 2014 13:41:38 UTC-3, Hoang Pham escribió:

Thales Maciel

unread,
Mar 13, 2014, 7:38:10 AM3/13/14
to wekamooc...@googlegroups.com
Hello, guys!

So I questioned this in the WEKA mailing list and got a proper answer from Professor Eibe Frank - who's Professor Ian's colleague at The University of Waikato and one of the authors of the Data Mining book this course is based on.
He states that the reason users cannot output source code for a naive bayes classifier in WEKA is that it simply has not been implemented, this far. Check it out in the attached file - Message 4.

Cheers,

Thales Vaz Maciel
Bacharel em Sistemas de Informação
Especialista em Sistemas Distribuídos
Senior Developer - HealthPlan Services
, Tampa, FL, US
Desenvolvedor de Software - e-Core IT Solutions, Porto Alegre, RS, BR
http://lattes.cnpq.br/7166030596636868
F: +55 (53) 81030692


--
You received this message because you are subscribed to the Google Groups "WekaMOOC-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wekamooc-gener...@googlegroups.com.
To post to this group, send email to wekamooc...@googlegroups.com.
Visit this group at http://groups.google.com/group/wekamooc-general.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wekamooc-general/b475b7e6-d2d4-4d60-8140-d1d1523220f9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Wekalist Digest, Vol 133, Issue 37.pdf

Fernando DM

unread,
Mar 13, 2014, 8:54:26 AM3/13/14
to wekamooc...@googlegroups.com
Hi Thales, that is correct, that's why I offered to help privately. 
For more information you can check "http://weka.8497.n7.nabble.com/Exporting-machine-learned-model-td1164.html"

Best Regards
Ing. Fernando García
Data Mining Specialist



Sujit Pal

unread,
Mar 13, 2014, 1:55:00 PM3/13/14
to wekamooc...@googlegroups.com
Thanks for the education Fernando and Thales. Now that I think about it, it should be possible to write source code for NB even though it would look really hairy but thats the same story for decision trees also. 

-sujit
Reply all
Reply to author
Forward
0 new messages