Man pages sections > man3 > Bio::Tools::PSort::SVMLoc

Bio::Tools::PSort::SVMLoc - Perl bindings for the libsvm Support Vector Machine

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


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


  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!


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.


  # 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.


  $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.


Matthew Laird <>


The libsvm homepage:


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.
2017-07-21 perl v5.26.0