Algorithm-SVM
view release on metacpan or search on metacpan
University Brinkman Laboratory and provides Perl bindings for a Support
Vector Machine. It is currently maintained by Matthew Laird and all
inquiries, patches and comments should be sent to him.
Algorithm::SVM is based on the libsvm library written by Chih-Chung Chang
and Chih-Jen Lin.
To read about the latest features, see the Changes file.
The author invites feedback on SVM. If you find a bug, please send the
information described in the BUGS section below.
2) INSTALLATION
---------------
For Solaris installation instructions please see README.solaris
To install this module type the following:
perl Makefile.PL
README.solaris view on Meta::CPAN
For this reason we've created some instructions that seem to work for
both cases, if you experience any problems please email us and let us
know the source of your perl distribution.
Installation of the Algorithm::SVM module is then as follows:
perl Makefile.PL.solaris
You will then need to edit the resulting Makefile, search for the
word 'static' and find the sections titled "MakeMaker static section"
and "MakeMaker static_lib section."
Comment out the lines which under each of these sections should look
something like:
# --- MakeMaker static section:
## $(INST_PM) has been moved to the all: target.
## It remains here for awhile to allow for old usage: "make static"
#static :: Makefile $(INST_STATIC) $(INST_PM)
static :: Makefile $(INST_STATIC)
@$(NOOP)
# --- MakeMaker static_lib section:
$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)/.exists
$(RM_RF) $@
$(FULL_AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@
$(CHMOD) $(PERM_RWX) $@
@echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld
Then continue with:
make
make test
lib/Algorithm/SVM/DataSet.pm view on Meta::CPAN
The label method is used to set or retrieve the DataSets label value.
Parameters and return values should be numeric values.
$attr = $ds->attribute(0);
$ds->attribute(0, 0.2621);
The attribute method is used to set dataset attribute values. If a single
value is provided, the method will return the corresponding value. If
two value are provided, the method will set the first parameter to the
value of the second.
$ds->asArray();
The asArray method returns the contents of a DataSet object in
an efficient way. An optional parameter, $numAttr, can be used to
pad the array with zeros if the number of attributes is not known
from the beginning (e.g. when creating a word vector on the fly,
since all keys not given are automatically assumed to be zero)
( run in 0.862 second using v1.01-cache-2.11-cpan-39bf76dae61 )