DataSharp/Data/Analysis/SupportVectorMachine.cs
/// <summary>
/// Gets error on k-th sample with current parameters.
/// </summary>
/// <param name="k">The index the sampel.</param>
/// <returns>Error on k-th sample with current parameters.</returns>
Gets error on k-th sample with current parameters.
Gets error on k - th sample with current parameters .
private double CalculateError(int k)
        {
            double hypothesis = Vector.ElementWiseMultiplication(alphas, labels) * kernelValues.GetRow(k) + bias;
            double error = hypothesis - labels[k];
            return error;
        }
private double CalculateError ( int k ) { double hypothesis = Vector . ElementWiseMultiplication ( alphas , labels ) * kernelValues . GetRow ( k ) + bias ; double error = hypothesis - labels [ k ] ; return error ; }
Gets error on k-th sample with current parameters.
Gets error on k - th sample with current parameters .
// Calculate the hypothesis of this SVM using current lagrange multipliers. // Calculate the error using the formula
Error on k-th sample with current parameters.
Error on k - th sample with current parameters .
k
int
The index the sampel.
The index the sampel .