ベイズ理論を使ってカテゴリ分けを行なうことが出来るperlモジュール『Algorithm::NaiveBayes』を使ったサンプル。 実際の下記ページに載ってるサンプルを元に作成した。Algorithm::NaiveBayes bayes02.pl(UTF8) #!/usr/bin/perl use Strict; use Warnings; use utf8; use Algorithm::NaiveBayes; use Encode qw/from_to encode decode_utf8/; use Data::Dumper; { no warnings ‘all’; package Data::Dumper; sub qquote { return shift; } } $Data::Dumper::Useperl = 1; my $nb = Algorithm::NaiveBa
![【perlメモ】Algorithm::NaiveBayesのサンプル](https://cdn-ak-scissors.b.st-hatena.com/image/square/8d71ff5111e05619a10d29bb40d7aebaa75c8fbc/height=288;version=1;width=512/https%3A%2F%2Fs0.wp.com%2Fi%2Fblank.jpg)