Skip Menu |
 

This queue is for tickets about the AI-Categorizer CPAN distribution.

Report information
The Basics
Id: 28749
Status: open
Priority: 0/
Queue: AI-Categorizer

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: (no value)



Subject: Can't take log of 0
Download (untitled) / with headers
text/plain 193b
Example script dies with Can't take log of 0 at c:/perl/site/lib/Statistics/Contingency.pm line 183. AI::Categorizer 0.09 Statistics::Contingency 0.06 -- Alexandr Ciornii, http://chorny.net
Subject: categ-log.pl
Download categ-log.pl
text/x-perl 929b
use strict; use warnings; use AI::Categorizer; my %data=( 'd1'=>{ categories => ['a'], content => 'excluding', } ); my %data1=( 'd2'=>{ content => 'including', } ); use AI::Categorizer::Collection::InMemory; my $training = AI::Categorizer::Collection::InMemory->new(data => \%data); my $test = AI::Categorizer::Collection::InMemory->new( data => \%data1 ); use AI::Categorizer::KnowledgeSet; use AI::Categorizer::Learner::NaiveBayes; #my $c = new AI::Categorizer(knowledge_set=>$c1); print "Loading training set\n"; my $k = AI::Categorizer::KnowledgeSet->new( verbose => 1 ); $k->load( collection => $training ); print "Training categorizer\n"; my $l = AI::Categorizer::Learner::NaiveBayes->new( verbose => 1 ); $l->train( knowledge_set => $k ); print "Categorizing test set\n"; my $experiment = $l->categorize_collection( collection => $test ); print $experiment->stats_table;
Download (untitled) / with headers
text/plain 149b
It was fixed in Statistics::Contingency 0.08. IMHO AI::Categorizer should depend on this version, not 0.06. -- Alexandr Ciornii, http://chorny.net
Download (untitled) / with headers
text/plain 300b
Thanks Alexandr. I haven't been able to keep up with my CPAN modules lately and I would very much welcome it if you're interested in maintaining it, or even just doing a release with some of the known problems. Let me know & I can grant you maintainer status on PAUSE and on the SVN repo. -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.