AI-XGBoost
view release on metacpan or search on metacpan
lib/AI/XGBoost/DMatrix.pm view on Meta::CPAN
=head1 VERSION
version 0.11
=head1 SYNOPSIS
use aliased 'AI::XGBoost::DMatrix';
my $train_data = DMatrix->FromFile(filename => 'agaricus.txt.train');
=head1 DESCRIPTION
XGBoost DMatrix perl model
Work In Progress, the API may change. Comments and suggestions are welcome!
=head1 METHODS
=head2 From
Construct a DMatrix from diferent sources. Based on parameters
dispatch to the correct From* method
Refer to From* to see what can be done.
=head2 FromFile
Construct a DMatrix from a file
=head3 Parameters
=over 4
=item filename
File to read
=item silent
Supress messages
=back
=head2 FromMat
Construct a DMatrix from a bidimensional array
=head3 Parameters
=over 4
=item matrix
Bidimensional array
=item label
Array with the labels of the rows of matrix. Optional
=item missing
Value to identify missing values. Optional, default `NaN`
=back
=head2 set_float_info
Set float type property
=head3 Parameters
=over 4
=item field
Field name of the information
=item info
array with the information
=back
=head2 set_float_info_pdl
Set float type property
=head3 Parameters
=over 4
=item field
Field name of the information
=item info
Piddle with the information
=back
=head2 get_float_info
Get float type property
=head3 Parameters
=over 4
=item field
Field name of the information
=back
=head2 set_uint_info
Set uint type property
=head3 Parameters
=over 4
=item field
Field name of the information
=item info
array with the information
=back
=head2 get_uint_info
Get uint type property
=head3 Parameters
=over 4
=item field
Field name of the information
=back
=head2 save_binary
Save DMatrix object as a binary file.
This file should be used with L<FromFile>
=head3 Parameters
=over 4
=item filename
Filename and path
=item silent
Don't show information messages, optional, default 1
=back
=head2 set_label
Set label of DMatrix. This label is the "classes" in classification problems
=head3 Parameters
=over 4
=item data
Array with the labels
=back
=head2 set_label_pdl
Set label of DMatrix. This label is the "classes" in classification problems
=head3 Parameters
=over 4
=item data
Piddle with the labels
=back
=head2 get_label
Get label of DMatrix. This label is the "classes" in classification problems
=head2 set_weight
Set weight of each instance
=head3 Parameters
=over 4
=item weight
Array with the weights
=back
=head2 set_weight_pdl
Set weight of each instance
=head3 Parameters
=over 4
=item weight
pdl with the weights
( run in 1.736 second using v1.01-cache-2.11-cpan-5735350b133 )