svn: /phpdoc/en/trunk/reference/svm/ svm.xml svmmodel/predict_probability.xml versions.xml

From: Date: Sun, 18 Dec 2011 21:46:20 +0000
Subject: svn: /phpdoc/en/trunk/reference/svm/ svm.xml svmmodel/predict_probability.xml versions.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9248@lists.php.net to get a copy of this message
ianb Sun, 18 Dec 2011 21:46:20 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=321143 Log: Adding predict probability function Changed paths: U phpdoc/en/trunk/reference/svm/svm.xml A phpdoc/en/trunk/reference/svm/svmmodel/predict_probability.xml U phpdoc/en/trunk/reference/svm/versions.xml Modified: phpdoc/en/trunk/reference/svm/svm.xml =================================================================== --- phpdoc/en/trunk/reference/svm/svm.xml 2011-12-18 21:31:10 UTC (rev 321142) +++ phpdoc/en/trunk/reference/svm/svm.xml 2011-12-18 21:46:20 UTC (rev 321143) @@ -280,7 +280,7 @@ <varlistentry xml:id="svm.constants.opt-propability"> <term><constant>SVM::OPT_PROBABILITY</constant></term> <listitem> - <para>Training parmater, boolean, for whether to use probability estimates</para> + <para>Training parameter, boolean, for whether to collect and use probability estimates</para> </listitem> </varlistentry> @@ -322,7 +322,7 @@ <varlistentry xml:id="svm.constants.opt-c"> <term><constant>SVM::OPT_C</constant></term> <listitem> - <para>The option for the cost parameter that controls tradeoff between errors and generality </para> + <para>The option for the cost parameter that controls tradeoff between errors and generality - effectively the penalty for misclassifying training examples. </para> </listitem> </varlistentry> Added: phpdoc/en/trunk/reference/svm/svmmodel/predict_probability.xml =================================================================== --- phpdoc/en/trunk/reference/svm/svmmodel/predict_probability.xml (rev 0) +++ phpdoc/en/trunk/reference/svm/svmmodel/predict_probability.xml 2011-12-18 21:46:20 UTC (rev 321143) @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 317663 $ --> + +<refentry xml:id="svmmodel.predict_probability" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>SVMModel::predict_probability</refname> + <refpurpose>Return class probabilities for previous unseen data</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <modifier>public</modifier> <type>float</type><methodname>SVMModel::predict_probability</methodname> + <methodparam><type>array</type><parameter>data</parameter></methodparam> + </methodsynopsis> + <para> + 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. + </para> + + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + The array to be classified. This should be a series of key => value + pairs in increasing key order, but not necessarily continuous. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>probabilities</parameter></term> + <listitem> + <para> + 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. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <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 + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><methodname>SVM::predict</methodname></member> + </simplelist> + </para> + </refsect1> + + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Modified: phpdoc/en/trunk/reference/svm/versions.xml =================================================================== --- phpdoc/en/trunk/reference/svm/versions.xml 2011-12-18 21:31:10 UTC (rev 321142) +++ phpdoc/en/trunk/reference/svm/versions.xml 2011-12-18 21:46:20 UTC (rev 321143) @@ -15,6 +15,7 @@ <function name='svmmodel::save' from='PECL svm &gt;= 0.1.0'/> <function name='svmmodel::load' from='PECL svm &gt;= 0.1.00.1.0'/> <function name='svmmodel::predict' from='PECL svm &gt;= 0.1.0'/> + <function name='svmmodel::predict_probability' from='PECL svm &gt;= 0.1.4'/> <function name='svmexception::__clone' from='PECL svm &gt;= 0.1.0'/> <function name='svmexception::__construct' from='PECL svm &gt;= 0.1.0'/> <function name='svmexception::getmessage' from='PECL svm &gt;= 0.1.0'/>

« previous php.doc.cvs (#9248) next »