The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Algorithm::AdaBoost::Classifier

DESCRIPTION

This class should be instanciated via Algorithm::AdaBoost->train.

METHODS

as_closure

Returns a CodeRef which delegates given arguments to classify.

Altough you can use the object itself like a CodeRef because &{} operator is overloaded with this method, it constructs a closure for each call. So if you classify many inputs, you should hold a closure explicitly or use classify directly.

classify

Executes binary classification. Takes 1 argument as a feature and return a real number. If the number is positive, given feature is considered to belong to one class. Similary, If the number is negative, given feature is considered to belong to another one class. If zero is returned, it means that the feature cannot be classified (very rare case).

AUTHOR

Koichi SATOH <sekia@cpan.org>