SVMModel::getSvrProbability

(PECL svm >= 0.1.5) Get the sigma value for regression types public float SVMModel::getSvrProbability ( void ) For regression models, returns a sigma value. If there is no probability information or the model is not SVR, 0 is returned. Returns: Returns a sigma value

SVMModel::getSvmType

(PECL svm >= 0.1.5) Get the SVM type the model was trained with public int SVMModel::getSvmType ( void ) Returns an integer value representing the type of the SVM model used, e.g SVM::C_SVC. Returns: Return an integer SVM type

SVMModel::getNrClass

(PECL svm >= 0.1.5) Returns the number of classes the model was trained with public int SVMModel::getNrClass ( void ) Returns the number of classes the model was trained with, will return 2 for one class and regression models. Returns: Return an integer number of classes

SVMModel::getLabels

(PECL svm >= 0.1.5) Get the labels the model was trained on public array SVMModel::getLabels ( void ) Return an array of labels that the model was trained on. For regression and one class models an empty array is returned. Returns: Return an array of labels See also: SVMModel::getNrClass() -

SVMModel::__construct

(PECL svm >= 0.1.0) Construct a new SVMModel public SVMModel::__construct ([ string $filename ] ) Build a new SVMModel. Models will usually be created from the SVM::train function, but then saved models may be restored directly. Parameters: filename The filename for the saved model file this model should load. Returns: Throws SVMException on e

SVMModel::checkProbabilityModel

(PECL svm >= 0.1.5) Returns true if the model has probability information public bool SVMModel::checkProbabilityModel ( void ) Returns true if the model contains probability information. Returns: Return a boolean value

SVM::train

(PECL svm >= 0.1.0) Create a SVMModel based on training data public SVMModel svm::train ( array $problem [, array $weights ] ) Train a support vector machine based on the supplied training data. Parameters: problem The problem can be provided in three different ways. An array, where the data should start with the class label (usually 1 or -1) then followed by a sparse

SVM::setOptions

(PECL svm >= 0.1.0) Set training parameters public bool SVM::setOptions ( array $params ) Set one or more training parameters. Parameters: params An array of training parameters, keyed on the SVM constants. Returns: Return true on success, throws SVMException on error.

SVM::getOptions

(PECL svm >= 0.1.0) Return the current training parameters public array SVM::getOptions ( void ) Retrieve an array containing the training parameters. The parameters will be keyed on the predefined SVM constants. Returns: Returns an array of configuration settings.

SVM::crossvalidate

(PECL svm >= 0.1.0) Test training params on subsets of the training data. public float svm::crossvalidate ( array $problem, int $number_of_folds ) Crossvalidate can be used to test the effectiveness of the current parameter set on a subset of the training data. Given a problem set and a n "folds", it separates the problem set into n subsets, and the repeatedly trains on one subset and tests on another. While the accuracy