ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-AI
perl-AI
Re: Numerical attributes in NaiveBayes
by Dominique Vlieghe other posts by this author
Sep 23 2003 2:12PM messages near this date
Re: Numerical attributes in NaiveBayes | Re: Numerical attributes in NaiveBayes
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:dominique.vlieghe@[...].be
(new) www:http://www.dmbr.ugent.be/
------------------------------
Thread:
Dominique Vlieghe
Ken Williams
Dominique Vlieghe
Ken Williams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved