/// <summary> /// Computes the probability of the prediction being True. /// </summary> /// <param name="x"></param> /// <returns></returns> public double PredictRaw(Vector x) { double prediction = 0d; this.Preprocess(x); if (KernelFunction.IsLinear) { prediction = Theta.Dot(x) + Bias; } else { for (int j = 0; j < X.Rows; j++) { prediction = prediction + Alpha[j] * Y[j] * KernelFunction.Compute(X[j, VectorType.Row], x); } prediction += Bias; } return(prediction); }