AI-XGBoost

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      "repository" : {
         "type" : "git",
         "url" : "https://github.com/pablrod/p5-AI-XGBoost.git",
         "web" : "https://github.com/pablrod/p5-AI-XGBoost"
      }
   },
   "version" : "0.11",
   "x_contributors" : [
      "Ruben <me@ruben.tech>"
   ],
   "x_serialization_backend" : "Cpanel::JSON::XS version 3.0115"
}

dist.ini  view on Meta::CPAN

user = pablrod
[@Git]
[Git::Contributors]
[Git::Tag]
tag_message = %c
[GatherDir]

[PruneCruft]

[ManifestSkip]
[MetaJSON]
[MetaYAML]
[Readme]
[ReadmeAnyFromPod]
type = gfm
filename = README.md
location = root

[MinimumPerlFast]
[ExtraTests]
[ExecDir]

lib/AI/XGBoost/Booster.pm  view on Meta::CPAN

sub get_dump {
    my $self = shift;
    return XGBoosterDumpModelEx( $self->_handle, "", 1, "text" );
}

sub attributes {
    my $self = shift;
    return { map { $_ => $self->get_attr($_) } @{ XGBoosterGetAttrNames( $self->_handle ) } };
}

sub TO_JSON {
    my $self = shift;
    my $trees = XGBoosterDumpModelEx( $self->_handle, "", 1, "json" );
    return "[" . join( ',', @$trees ) . "]";
}

sub BUILD {
    my $self = shift;
    my $args = shift;
    $self->_handle( XGBoosterCreate( [ map { $_->handle } @{ $args->{'cache'} } ] ) );
}

lib/AI/XGBoost/Booster.pm  view on Meta::CPAN

Name of feature map file

=back

=head2 get_dump

=head2 attributes

Returns all attributes of the booster as a HASHREF

=head2 TO_JSON

Serialize the booster to JSON.

This method is to be used with the option C<convert_blessed> from L<JSON>.
(See L<https://metacpan.org/pod/JSON#OBJECT-SERIALISATION>)

Warning: this API is subject to changes

=head2 BUILD

Use new, this method is just an internal helper

=head2 DEMOLISH

Internal destructor. This method is called automatically



( run in 1.862 second using v1.01-cache-2.11-cpan-140bd7fdf52 )