AI-NaiveBayes1

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


2.010  Tue May 25 18:30:47 ADT 2021
  - fixing bugs reported by perltesters on some platforms.
    It seems to be due to running tests in a parallel way, and
    that using the same name of the temporary file is the problem.

2.009  Sun May 23 09:23:06 ADT 2021
  - fixed bug with t/auxfunctions.pl not being located during
    testing (hopefully fixed because it requires a different
    environment to reproduce)
  - made Changes reverse chronological

2.008  Fri May 21 10:56:33 ADT 2021
  - GitHub release
  - documentation improvements

2.007  Wed Jan 29 05:58:37 AST 2020
  - documentation update
  - fixed bug: import_from_YAML and import_from_YAML_file now
    return bless-ed references (they did not return before)

NaiveBayes1.pm  view on Meta::CPAN

 my $p = $nb->predict(attributes=>{outlook=>'sunny',temperature=>66,humidity=>90,windy=>'TRUE'});

 YAML::DumpFile('file', $p);
 die unless (abs($p->{'play=no'}  - 0.792) < 0.001);
 die unless(abs($p->{'play=yes'} - 0.208) < 0.001);

=head1 HISTORY

L<Algorithm::NaiveBayes> by Ken Williams was not what I needed so I
wrote this one.  L<Algorithm::NaiveBayes> is oriented towards text
categorization, it includes smoothing, and log probabilities.  This
module is a generic, basic Naive Bayes algorithm.

=head1 THANKS

I would like to thank Daniel Bohmer for documentation corrections,
Yung-chung Lin (cpan:xern) for the implementation of the Gaussian model
for continuous variables, and the following people for bug reports, support,
and comments (in no particular order):

Michael Stevens, Tom Dyson, Dan Von Kohorn, Craig Talbert,



( run in 1.205 second using v1.01-cache-2.11-cpan-49f99fa48dc )