php-doc-en/reference/svm/svmmodel/predict-probability.xml
Yannick Torres 18046e0224 Fix svn keywords
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325489 c90b9560-bf6c-de11-be94-00142212c4b1
2012-05-01 12:31:16 +00:00

92 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<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
-->