Algorithm-SVMLight
view release on metacpan or search on metacpan
lib/Algorithm/SVMLight.pm view on Meta::CPAN
requirements and can handle problems with many thousands of support
vectors efficiently.
-- http://svmlight.joachims.org/
=back
Support Vector Machines in general, and SVMLight specifically,
represent some of the best-performing Machine Learning approaches in
domains such as text categorization, image recognition, bioinformatics
string processing, and others.
For efficiency reasons, the underlying SVMLight engine indexes features by integers, not
strings. Since features are commonly thought of by name (e.g. the
words in a document, or mnemonic representations of engineered
features), we provide in C<Algorithm::SVMLight> a simple mechanism for
mapping back and forth between feature names (strings) and feature
indices (integers). If you want to use this mechanism, use the
C<add_instance()> and C<predict()> methods. If not, use the
C<add_instance_i()> (or C<read_instances()>) and C<predict_i()>
methods.
lib/Algorithm/SVMLight.pm view on Meta::CPAN
coef_lin
coef_const
custom
For an explanation of these parameters, you may be interested in
looking at the F<svm_common.h> file in the SVMLight distribution.
It would be a good idea if you only set these parameters via arguments
to C<new()> (see above) or right after calling C<new()>, since I don't
think the underlying C code expects them to change in the middle of a
process.
=item add_instance(label => $x, attributes => \%y)
Adds a training instance to the set of instances which will be used to
train the model. An C<attributes> parameter specifies a hash of
attribute-value pairs for the instance, and a C<label> parameter
specifies the label. The label must be a number, and typically it
should be C<1> for positive training instances and C<-1> for negative
training instances. The keys of the C<attributes> hash should be
strings, and the values should be numbers (the values of each attribute).
( run in 0.226 second using v1.01-cache-2.11-cpan-8d75d55dd25 )