Scroll to navigation

Bio::Tools::PSort::SVMLoc(3pm) User Contributed Perl Documentation Bio::Tools::PSort::SVMLoc(3pm)

NAME

Bio::Tools::PSort::SVMLoc - Perl bindings for the libsvm Support Vector Machine library in Psortb.

SYNOPSIS

  use Bio::Tools::PSort::SVMLoc;

  # Load the model stored in the file 'sample.model' and Frequent Patterns in 'FreqPatt'
  $svm = new Bio::Tools::PSort::SVMLoc(Model => 'sample.model', FreqPattern => 'FreqPatt');

  # Classify a sequence in $seq, do not include FASTA headers!
  $svm->classify($seq);

DESCRIPTION

Bio::Tools::PSort::SVMLoc implements a Support Vector Machine for Perl. Support Vector Machines provide a method for creating classifcation functions from a set of labeled training data, from which predictions can be made for subsequent data sets.

Bio::Tools::PSort::SVMLoc is a stripped down version of Algorithm::SVM design specifically for PSortb. If you need functionality such as training of SVM, please use that module instead.

CONSTRUCTOR

  # Load an existing SVM.
  $svm = new Bio::Tools::PSort::SVMLoc(Model  => 'sample.model', FreqPattern => 'FreqPatt');

A Bio::Tools::PSort::SVMLoc object must be created loaded from an existing model file.

An existing SVM is loaded from a file using the Model named parameter and the frequent patterns set. The model file should be of the format produced by the svm->train program (distributed with the libsvm library) or from the $svm->save() method in Algorithm::SVM.

METHODS

  $result = $svm->classify($seq);

The classify method is used to classify a set of data according to the loaded model. The method accepts a single parameter, which should be a protein sequence object. Returns a floating point number corresponding to the predicted value.

MAINTAINER

Matthew Laird <matt@brinkman.mbb.sfu.ca>

SEE ALSO

The libsvm homepage: http://www.csie.ntu.edu.tw/~cjlin/libsvm/

ACKNOWLEDGEMENTS

Thanks go out to Fiona Brinkman and the other members of the Simon Fraser University Brinkman Laboratory for providing me the opportunity to develop this module. Additional thanks go to Chih-Jen Lin, one of the libsvm authors, for being particularly helpful during the development process.
2018-10-22 perl v5.24.1