Algorithm-AdaBoost
view release on metacpan or search on metacpan
lib/Algorithm/AdaBoost.pm view on Meta::CPAN
+{ feature => [...], label => -1, },
...
],
weak_classifier_generator => \&my_poor_learning_algorithm,
);
$learner->train(num_iterations => 1_000);
# Now you have a boost-ed classifier (Algorithm::AdaBoost::Classifier).
my $classifier = $learner->final_classifier;
given ($classifier->classify([...])) {
when ($_ > 0) { say 'The data belongs to class 1.' }
when ($_ < 0) { say 'The data belongs to class 2.' }
default { warn 'The data cannot be classified.' }
}
=head1 DESCRIPTION
AdaBoost is a machine learning algorithm proposed by Freund and Schapire.
Using an arbitrary binary classification algorithm, The algorithm can construct a more accurate classifier (i.e. it is a meta-algorithm).
=head1 METHODS
( run in 1.038 second using v1.01-cache-2.11-cpan-483215c6ad5 )