Algorithm-SlopeOne

 view release on metacpan or  search on metacpan

lib/Algorithm/SlopeOne.pm  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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

1
2
3
4
5
6
7
8
9
10
11
12
#!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

1
2
3
4
5
6
7
8
9
10
11
12
#!perl
use strict;
use utf8;
use warnings qw(all);
 
 
 
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

1
2
3
4
5
6
7
8
9
10
11
12
13
#!perl
use strict;
use utf8;
use warnings qw(all);
 
 
 
my $s = Algorithm::SlopeOne->new;
 
is_deeply(
    $s->predict({ Eastenders => 7.25 }),



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