Algorithm-SlopeOne
view release on metacpan or search on metacpan
lib/Algorithm/SlopeOne.pm view on Meta::CPAN
package Algorithm::SlopeOne;
# ABSTRACT: Slope One collaborative filtering for rated resources
use strict;
use utf8;
use warnings qw(all);
use Carp qw(confess);
our $VERSION = '0.004'; # VERSION
sub new {
my ($class) = @_;
return bless {
t/00-load.t view on Meta::CPAN
#!perl
use strict;
use utf8;
use warnings qw(all);
use Test::More tests => 1;
BEGIN {
use_ok(q(Algorithm::SlopeOne));
};
diag(qq(Algorithm::SlopeOne v$Algorithm::SlopeOne::VERSION, Perl $], $^X));
t/01-simple.t view on Meta::CPAN
#!perl
use strict;
use utf8;
use warnings qw(all);
use Test::More;
use Algorithm::SlopeOne;
my $s = Algorithm::SlopeOne->new;
isa_ok($s, q(Algorithm::SlopeOne));
can_ok($s, qw(add predict));
t/02-bad-input.t view on Meta::CPAN
#!perl
use strict;
use utf8;
use warnings qw(all);
use Test::More;
use Algorithm::SlopeOne;
my $s = Algorithm::SlopeOne->new;
is_deeply(
$s->predict({ Eastenders => 7.25 }),
( run in 0.559 second using v1.01-cache-2.11-cpan-49f99fa48dc )