Algorithm-SlopeOne
view release on metacpan or search on metacpan
lib/Algorithm/SlopeOne.pm view on Meta::CPAN
12345678910111213141516package
Algorithm::SlopeOne;
# ABSTRACT: Slope One collaborative filtering for rated resources
use
strict;
use
utf8;
our
$VERSION
=
'0.004'
;
# VERSION
sub
new {
my
(
$class
) =
@_
;
return
bless
{
t/00-load.t view on Meta::CPAN
t/01-simple.t view on Meta::CPAN
123456789101112#!perl
use
strict;
use
utf8;
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
12345678910111213#!perl
use
strict;
use
utf8;
use
Test::More;
use
Algorithm::SlopeOne;
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 )