[doc-en] master: svm: fix XML to remove useless wrapping para tags via script

From: Date: Mon, 26 Jan 2026 14:47:33 +0000
Subject: [doc-en] master: svm: fix XML to remove useless wrapping para tags via script
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23086@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-01-26T14:47:30Z Commit: https://github.com/php/doc-en/commit/63d53ffd1aeac8cb31553af97085c5175d722a7f Raw diff: https://github.com/php/doc-en/commit/63d53ffd1aeac8cb31553af97085c5175d722a7f.diff svm: fix XML to remove useless wrapping para tags via script Changed paths: M reference/svm/svm/crossvalidate.xml M reference/svm/svm/setoptions.xml M reference/svm/svm/train.xml M reference/svm/svmmodel/construct.xml M reference/svm/svmmodel/getlabels.xml M reference/svm/svmmodel/load.xml M reference/svm/svmmodel/predict-probability.xml M reference/svm/svmmodel/predict.xml M reference/svm/svmmodel/save.xml Diff: diff --git a/reference/svm/svm/crossvalidate.xml b/reference/svm/svm/crossvalidate.xml index e2a5df3d58dc..7c6eedfa0e5f 100644 --- a/reference/svm/svm/crossvalidate.xml +++ b/reference/svm/svm/crossvalidate.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svm.crossvalidate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svm.crossvalidate"> <refnamediv> <refname>SVM::crossvalidate</refname> <refpurpose>Test training params on subsets of the training data</refpurpose> @@ -15,65 +14,60 @@ <methodparam><type>int</type><parameter>number_of_folds</parameter></methodparam> </methodsynopsis> <para> - Crossvalidate can be used to test the effectiveness of the current - parameter set on a subset of the training data. Given a problem set - and a n "folds", it separates the problem set into n subsets, and the - repeatedly trains on one subset and tests on another. While the accuracy - will generally be lower than a SVM trained on the enter data set, the - accuracy score returned should be relatively useful, so it can be used to - test different training parameters. + Crossvalidate can be used to test the effectiveness of the current + parameter set on a subset of the training data. Given a problem set + and a n "folds", it separates the problem set into n subsets, and the + repeatedly trains on one subset and tests on another. While the accuracy + will generally be lower than a SVM trained on the enter data set, the + accuracy score returned should be relatively useful, so it can be used to + test different training parameters. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>problem</parameter></term> - <listitem> - <para> - The problem data. This can either be in the form of an array, the URL - of an SVMLight formatted file, or a stream to an opened SVMLight - formatted datasource. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>number_of_folds</parameter></term> - <listitem> - <para> - The number of sets the data should be divided into and cross tested. - A higher number means smaller training sets and less reliability. 5 is - a good number to start with. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>problem</parameter></term> + <listitem> + <para> + The problem data. This can either be in the form of an array, the URL + of an SVMLight formatted file, or a stream to an opened SVMLight + formatted datasource. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>number_of_folds</parameter></term> + <listitem> + <para> + The number of sets the data should be divided into and cross tested. + A higher number means smaller training sets and less reliability. 5 is + a good number to start with. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - The correct percentage, expressed as a floating point number from 0-1. - In the case of NU_SVC or EPSILON_SVR kernels the mean squared error will - returned instead. + The correct percentage, expressed as a floating point number from 0-1. + In the case of NU_SVC or EPSILON_SVR kernels the mean squared error will + returned instead. </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVM::train</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVM::train</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svm/setoptions.xml b/reference/svm/svm/setoptions.xml index 3b83f40da1fe..a8eded0f77ab 100644 --- a/reference/svm/svm/setoptions.xml +++ b/reference/svm/svm/setoptions.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svm.setoptions" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svm.setoptions"> <refnamediv> <refname>SVM::setOptions</refname> <refpurpose>Set training parameters</refpurpose> @@ -21,18 +20,16 @@ <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>params</parameter></term> - <listitem> - <para> - An array of training parameters, keyed on the SVM constants. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>params</parameter></term> + <listitem> + <para> + An array of training parameters, keyed on the SVM constants. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> @@ -42,7 +39,6 @@ </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svm/train.xml b/reference/svm/svm/train.xml index c12d38b45804..3fa2b361dd80 100644 --- a/reference/svm/svm/train.xml +++ b/reference/svm/svm/train.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svm.train" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svm.train"> <refnamediv> <refname>SVM::train</refname> <refpurpose>Create a SVMModel based on training data</refpurpose> @@ -15,44 +14,42 @@ <methodparam choice="opt"><type>array</type><parameter>weights</parameter></methodparam> </methodsynopsis> <para> - Train a support vector machine based on the supplied training data. + Train a support vector machine based on the supplied training data. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>problem</parameter></term> - <listitem> - <para> - The problem can be provided in three different ways. - An array, where the data should start with the class label - (usually 1 or -1) then followed by a sparse data set of - dimension => data pairs. - A URL to a file containing a SVM Light formatted problem, with the - each line being a new training example, the start of each line - containing the class (1, -1) then a series of tab separated data - values shows as key:value. - A opened stream pointing to a data source formatted as in the file above. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>weights</parameter></term> - <listitem> - <para> - Weights are an optional set of weighting parameters for the different - classes, to help account for unbalanced training sets. For example, - if the classes were 1 and -1, and -1 had significantly more example - than one, the weight for -1 could be 0.5. Weights should be in the range 0-1. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>problem</parameter></term> + <listitem> + <para> + The problem can be provided in three different ways. + An array, where the data should start with the class label + (usually 1 or -1) then followed by a sparse data set of + dimension =&gt; data pairs. + A URL to a file containing a SVM Light formatted problem, with the + each line being a new training example, the start of each line + containing the class (1, -1) then a series of tab separated data + values shows as key:value. + A opened stream pointing to a data source formatted as in the file above. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>weights</parameter></term> + <listitem> + <para> + Weights are an optional set of weighting parameters for the different + classes, to help account for unbalanced training sets. For example, + if the classes were 1 and -1, and -1 had significantly more example + than one, the weight for -1 could be 0.5. Weights should be in the range 0-1. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> @@ -64,7 +61,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svmmodel/construct.xml b/reference/svm/svmmodel/construct.xml index bd324e62334f..33a266872bbe 100644 --- a/reference/svm/svmmodel/construct.xml +++ b/reference/svm/svmmodel/construct.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svmmodel.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svmmodel.construct"> <refnamediv> <refname>SVMModel::__construct</refname> <refpurpose>Construct a new SVMModel</refpurpose> @@ -14,7 +13,7 @@ <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam> </constructorsynopsis> <para> - Build a new SVMModel. Models will usually be created from the + Build a new SVMModel. Models will usually be created from the SVM::train function, but then saved models may be restored directly. </para> @@ -22,18 +21,16 @@ <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>filename</parameter></term> - <listitem> - <para> - The filename for the saved model file this model should load. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + The filename for the saved model file this model should load. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="errors"> @@ -45,15 +42,12 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVMModel::load</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVMModel::load</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svmmodel/getlabels.xml b/reference/svm/svmmodel/getlabels.xml index c0760768ed7d..e57c5c90f1c2 100644 --- a/reference/svm/svmmodel/getlabels.xml +++ b/reference/svm/svmmodel/getlabels.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision$ --> - -<refentry xml:id="svmmodel.getlabels" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<!-- $Revision$ --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svmmodel.getlabels"> <refnamediv> <refname>SVMModel::getLabels</refname> <refpurpose>Get the labels the model was trained on</refpurpose> @@ -11,11 +10,11 @@ &reftitle.description; <methodsynopsis> <modifier>public</modifier> <type>array</type><methodname>SVMModel::getLabels</methodname> - <void /> + <void/> </methodsynopsis> <para> Return an array of labels that the model was trained on. For regression and one class - models an empty array is returned. + models an empty array is returned. </para> </refsect1> @@ -34,15 +33,12 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVMModel::getNrClass</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVMModel::getNrClass</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svmmodel/load.xml b/reference/svm/svmmodel/load.xml index 42d855fccf09..f9ab9c48bd56 100644 --- a/reference/svm/svmmodel/load.xml +++ b/reference/svm/svmmodel/load.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svmmodel.load" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svmmodel.load"> <refnamediv> <refname>SVMModel::load</refname> <refpurpose>Load a saved SVM Model</refpurpose> @@ -21,18 +20,16 @@ <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>filename</parameter></term> - <listitem> - <para> - The filename of the model. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + The filename of the model. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> @@ -45,15 +42,12 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVMModel::save</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVMModel::save</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svmmodel/predict-probability.xml b/reference/svm/svmmodel/predict-probability.xml index ed1c8e229242..6a39904fa4d4 100644 --- a/reference/svm/svmmodel/predict-probability.xml +++ b/reference/svm/svmmodel/predict-probability.xml @@ -1,7 +1,6 @@ <?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"> +<!-- $Revision$ --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svmmodel.predict-probability"> <refnamediv> <refname>SVMModel::predict_probability</refname> <refpurpose>Return class probabilities for previous unseen data</refpurpose> @@ -24,35 +23,33 @@ <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> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + The array to be classified. This should be a series of key =&gt; 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> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Float the predicted value. This will be a class label in the case of + 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> @@ -60,16 +57,13 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVM::predict</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVM::predict</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svmmodel/predict.xml b/reference/svm/svmmodel/predict.xml index 6c7f510f7784..a70f715444c9 100644 --- a/reference/svm/svmmodel/predict.xml +++ b/reference/svm/svmmodel/predict.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svmmodel.predict" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svmmodel.predict"> <refnamediv> <refname>SVMModel::predict</refname> <refpurpose>Predict a value for previously unseen data</refpurpose> @@ -14,7 +13,7 @@ <methodparam><type>array</type><parameter>data</parameter></methodparam> </methodsynopsis> <para> - This function accepts an array of data and attempts to predict the class + 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. </para> @@ -22,25 +21,23 @@ <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> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + The array to be classified. This should be a series of key =&gt; value + pairs in increasing key order, but not necessarily continuous. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Float the predicted value. This will be a class label in the case of + 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> @@ -48,16 +45,13 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVM::train</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVM::train</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/svm/svmmodel/save.xml b/reference/svm/svmmodel/save.xml index b96d8ef4bcc2..4b0827ef99eb 100644 --- a/reference/svm/svmmodel/save.xml +++ b/reference/svm/svmmodel/save.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="svmmodel.save" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="svmmodel.save"> <refnamediv> <refname>SVMModel::save</refname> <refpurpose>Save a model to a file</refpurpose> @@ -14,46 +13,41 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Save the model data to a file, for later use. + Save the model data to a file, for later use. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>filename</parameter></term> - <listitem> - <para> - The file to save the model to. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + The file to save the model to. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Throws SVMException on error. + Throws SVMException on error. Returns true on success. </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><methodname>SVMModel::load</methodname></member> - </simplelist> - </para> + <simplelist> + <member><methodname>SVMModel::load</methodname></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml

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