Click or drag to resize

SVM.GetDecisionFunction Method

Retrieves the decision function

Namespace:  OpenCvSharp.ML
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntax
public double GetDecisionFunction(
	int i,
	OutputArray alpha,
	OutputArray svidx
)

Parameters

i
Type: System.Int32
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
Type: OpenCvSharp.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
Type: OpenCvSharp.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.

Return Value

Type: Double
See Also