Table of Contents

Method GetDecisionFunction

Namespace
OpenCvSharp.ML
Assembly
OpenCvSharp.dll

GetDecisionFunction(int, OutputArray, OutputArray)

Retrieves the decision function

public double GetDecisionFunction(int i, OutputArray alpha, OutputArray svidx)

Parameters

i int

i the index of the decision function. If the problem solved is regression, 1-class or 2-class classification, then there will be just one decision function and the index should always be 0. Otherwise, in the case of N-class classification, there will be N(N-1)/2 decision functions.

alpha OutputArray

alpha the optional output vector for weights, corresponding to different support vectors. In the case of linear %SVM all the alpha's will be 1's.

svidx OutputArray

the optional output vector of indices of support vectors within the matrix of support vectors (which can be retrieved by SVM::getSupportVectors). In the case of linear %SVM each decision function consists of a single "compressed" support vector.

Returns

double