AI-ConfusionMatrix
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/02_cmData.t view on Meta::CPAN
use Test::More tests => 6;
require_ok( 'AI::ConfusionMatrix' );
use AI::ConfusionMatrix;
my $hash = {
1978 => {
1978 => 5,
1974 => 1,
},
2005 => {
1978 => 1,
2005 => 3,
2002 => 1
},
2003 => {
2005 => 2,
2003 => 7,
}
};
my %cmData = getConfusionMatrix($hash);
is($cmData{stats}{2003}{tp}, 7, 'Test parsing true positives');
is($cmData{stats}{2005}{sensitivity}, 60, 'Test parsing sensitivity');
is($cmData{totals}{tp}, 15, 'Test parsing total true positives');
is($cmData{totals}{2003}, 7, 'Test parsing total');
is_deeply($cmData{columns}, [1974, 1978, 2002, 2003, 2005], 'Test parsing columns');
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.410 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )