PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

SVMModel::predict

(PECL svm >= 0.1.0)

SVMModel::predictPredict a value for previously unseen data

Description

public float SVMModel::predict ( array $data )

This function accepts an array of data and attempts to predict the class or regression value based on the model extracted from previously trained data.

Parameters

data

The array to be classified. This should be a series of key => value pairs in increasing key order, but not necessarily continuous.

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::train - Create a SVMModel based on training data

PHP Manual