<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Predict a value for previously unseen data</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="svmmodel.predict-probability.html">SVMModel::predict_probability</a></div> <div class="next" style="text-align: right; float: right;"><a href="svmmodel.save.html">SVMModel::save</a></div> <div class="up"><a href="class.svmmodel.html">SVMModel</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="svmmodel.predict" class="refentry"> <div class="refnamediv"> <h1 class="refname">SVMModel::predict</h1> <p class="verinfo">(PECL svm >= 0.1.0)</p><p class="refpurpose"><span class="refname">SVMModel::predict</span> — <span class="dc-title">Predict a value for previously unseen data</span></p> </div> <div class="refsect1 description" id="refsect1-svmmodel.predict-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">float</span> <span class="methodname"><strong>SVMModel::predict</strong></span> ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$data</code></span> )</div> <p class="para rdfs-comment"> 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. </p> </div> <div class="refsect1 parameters" id="refsect1-svmmodel.predict-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <code class="parameter">data</code></dt> <dd> <p class="para"> The array to be classified. This should be a series of key => value pairs in increasing key order, but not necessarily continuous. </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-svmmodel.predict-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> 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 </p> </div> <div class="refsect1 seealso" id="refsect1-svmmodel.predict-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><span class="methodname"><a href="svm.train.html" class="methodname" rel="rdfs-seeAlso">SVM::train()</a> - Create a SVMModel based on training data</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="svmmodel.predict-probability.html">SVMModel::predict_probability</a></div> <div class="next" style="text-align: right; float: right;"><a href="svmmodel.save.html">SVMModel::save</a></div> <div class="up"><a href="class.svmmodel.html">SVMModel</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>