diff --git a/reference/svm/svm.xml b/reference/svm/svm.xml index 19eccc8105..45c9b74140 100644 --- a/reference/svm/svm.xml +++ b/reference/svm/svm.xml @@ -280,7 +280,7 @@ SVM::OPT_PROBABILITY - Training parmater, boolean, for whether to use probability estimates + Training parameter, boolean, for whether to collect and use probability estimates @@ -322,7 +322,7 @@ SVM::OPT_C - The option for the cost parameter that controls tradeoff between errors and generality + The option for the cost parameter that controls tradeoff between errors and generality - effectively the penalty for misclassifying training examples. diff --git a/reference/svm/svmmodel/predict_probability.xml b/reference/svm/svmmodel/predict_probability.xml new file mode 100644 index 0000000000..45d4815696 --- /dev/null +++ b/reference/svm/svmmodel/predict_probability.xml @@ -0,0 +1,92 @@ + + + + + + SVMModel::predict_probability + Return class probabilities for previous unseen data + + + + &reftitle.description; + + public floatSVMModel::predict_probability + arraydata + + + 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. + + + + + + &reftitle.parameters; + + + + data + + + The array to be classified. This should be a series of key => value + pairs in increasing key order, but not necessarily continuous. + + + + + probabilities + + + 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. + + + + + + + + + &reftitle.returnvalues; + + 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 + + + + + &reftitle.seealso; + + + SVM::predict + + + + + + + + diff --git a/reference/svm/versions.xml b/reference/svm/versions.xml index 1b1ec2b408..f5434d6fb8 100644 --- a/reference/svm/versions.xml +++ b/reference/svm/versions.xml @@ -15,6 +15,7 @@ +