On Tue, 2003-09-23 at 16:00, Ken Williams wrote: > On Tuesday, September 23, 2003, at 02:21 AM, Dominique Vlieghe wrote: > > > Hi, > > > > I was wondering whether the NaiveBayes Modules (AI::NaiveBayes1 and > > Algorithm::NaiveBayes) are capable of handling numerical attributes. A > > first glance on the code tells me they are not. Is this so and if yes, > > does anyone have an alternative package? Are there any plans to > > introduce numerical attributes in the modules? > > Algorithm::NaiveBayes uses numerical attributes: > > $nb->add_instance > (attributes => {foo => 1.7, bar => 3.234}, > label => 'whatever'); > > Or do I misunderstand your question?
I think you do, what I mean is that it should create some sort of distribution (e.g. a normal distribution) of the values of a given attribute. The naive bayes modules will (if I'm not mistaken) count the number of occurrences of a (numeric or not) attribute e.g. in your example you will have 1 times 1.7 and 1 times 3.234. In weka for example the nature of the attribute is determined by the input file: either discrete or numeric. -- ------------------------------ Dominique Vlieghe, Ph.D., Bioinformatics Core, Department for Molecular Biomedical Research (DMBR) VIB - Ghent University (new) 'Fiers-Schell-Van Montagu' building (new) Technologiepark 927 (new) B-9052 Ghent (Zwijnaarde), Belgium (new) Tel : +32-(0)9-33-13.693 (new) Fax : +32-(0)9-33-13.609 (new) email:[EMAIL PROTECTED] (new) www:http://www.dmbr.ugent.be/ ------------------------------