.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Tools::PSort::SVMLoc 3pm" .TH Bio::Tools::PSort::SVMLoc 3pm 2024-05-26 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Bio::Tools::PSort::SVMLoc \- Perl bindings for the libsvm Support Vector Machine library in Psortb. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Tools::PSort::SVMLoc; \& \& # Load the model stored in the file \*(Aqsample.model\*(Aq and Frequent Patterns in \*(AqFreqPatt\*(Aq \& $svm = new Bio::Tools::PSort::SVMLoc(Model => \*(Aqsample.model\*(Aq, FreqPattern => \*(AqFreqPatt\*(Aq); \& \& # Classify a sequence in $seq, do not include FASTA headers! \& $svm\->classify($seq); .Ve .SH DESCRIPTION .IX Header "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. .PP 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. .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" .Vb 2 \& # Load an existing SVM. \& $svm = new Bio::Tools::PSort::SVMLoc(Model => \*(Aqsample.model\*(Aq, FreqPattern => \*(AqFreqPatt\*(Aq); .Ve .PP A Bio::Tools::PSort::SVMLoc object must be created loaded from an existing model file. .PP 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 \f(CW$svm\fR\->\fBsave()\fR method in Algorithm::SVM. .SH METHODS .IX Header "METHODS" .Vb 1 \& $result = $svm\->classify($seq); .Ve .PP 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. .SH MAINTAINER .IX Header "MAINTAINER" Matthew Laird .SH "SEE ALSO" .IX Header "SEE ALSO" The libsvm homepage: http://www.csie.ntu.edu.tw/~cjlin/libsvm/ .SH ACKNOWLEDGEMENTS .IX Header "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.