# Support Vector Machine

# Introduction

Warning

This extension is EXPERIMENTAL. The behaviour of this extension including the names of its functions and any other documentation surrounding this extension may change without notice in a future release of PHP. This extension should be used at your own risk.

LibSVM is an efficient solver for SVM classification and regression problems. The svm extension wraps this in a PHP interface for easy use in PHP scripts.

- Installing/Configuring
  - Requirements
  - Installation
- Examples
- SVM — The SVM class
  - SVM::__construct — Construct a new SVM object
  - SVM::crossvalidate — Test training params on subsets of the training data
  - SVM::getOptions — Return the current training parameters
  - SVM::setOptions — Set training parameters
  - SVM::train — Create a SVMModel based on training data
- SVMModel — The SVMModel class
  - SVMModel::checkProbabilityModel — Returns true if the model has probability information
  - SVMModel::__construct — Construct a new SVMModel
  - SVMModel::getLabels — Get the labels the model was trained on
  - SVMModel::getNrClass — Returns the number of classes the model was trained with
  - SVMModel::getSvmType — Get the SVM type the model was trained with
  - SVMModel::getSvrProbability — Get the sigma value for regression types
  - SVMModel::load — Load a saved SVM Model
  - SVMModel::predict — Predict a value for previously unseen data
  - SVMModel::predict_probability — Return class probabilities for previous unseen data
  - SVMModel::save — Save a model to a file

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open