SVMModel::predict_probability
(PECL svm >= 0.1.4)
SVMModel::predict_probability — Return class probabilities for previous unseen data
Description
$data
)This function accepts an array of data and attempts to predict the class, as with the predict function. Additionally, however, this function returns an array of probabilities, one per class in the model, which represent the estimated chance of the data supplied being a member of that class. Requires that the model to be used has been trained with the probability parameter set to true.
Parameters
-
data
-
The array to be classified. This should be a series of key => value pairs in increasing key order, but not necessarily continuous.
-
probabilities
-
The supplied value will be filled with the probabilities. This will be either null, in the case of a model without probability information, or an array where the index is the class name and the value the predicted probability.
Return Values
Float the predicted value. This will be a class label in the case of classification, a real value in the case of regression. Throws SVMException on error
See Also
- SVM::predict()
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Другие службы
- Support Vector Machine
- Функция 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_probability() - Return class probabilities for previous unseen data
- Функция SVMModel::predict() - Predict a value for previously unseen data
- Функция SVMModel::save() - Save a model to a file
Коментарии
404 Not Found