Algorithm-LibLinear

 view release on metacpan or  search on metacpan

lib/Algorithm/LibLinear/DataSet.pm  view on Meta::CPAN

use Algorithm::LibLinear::Types;
use Carp qw//;
use List::MoreUtils qw/none/;
use Smart::Args;

sub new {
    args
        my $class => 'ClassName',
        my $data_set => 'ArrayRef[Algorithm::LibLinear::LabeledData]';

    bless +{ data_set => $data_set } => $class;
}

sub load {
    args
        my $class => 'ClassName',
        my $fh => +{ isa => 'FileHandle', optional => 1, },
        my $filename => +{ isa => 'Str', optional => 1, },
        my $string => +{ isa => 'Str', optional => 1, };

    if (none { defined } ($fh, $filename, $string)) {

lib/Algorithm/LibLinear/Model.pm  view on Meta::CPAN

use Algorithm::LibLinear;  # For Algorithm::LibLinear::Model::Raw
use Algorithm::LibLinear::Types;
use Carp qw//;
use Smart::Args;

sub new {
    args
        my $class => 'ClassName',
        my $raw_model => 'Algorithm::LibLinear::Model::Raw';

    bless +{ raw_model => $raw_model, } => $class;
}

sub load {
    args
        my $class => 'ClassName',
        my $filename => 'Str';

    my $raw_model = Algorithm::LibLinear::Model::Raw->load($filename);
    $class->new(raw_model => $raw_model);
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.049 second using v1.00-cache-1.14-grep-28634ff-cpan-4d46879620f )