public static Product ( double x, double y ) : double | ||
x | double | The first vector |
y | double | The second vector |
Résultat | double |
/// <summary> /// Sigmoid kernel function. /// </summary> /// /// <param name="x">Vector <c>x</c> in input space.</param> /// <param name="y">Vector <c>y</c> in input space.</param> /// <returns>Dot product in feature (kernel) space.</returns> /// public override double Function(double[] x, double[] y) { #pragma warning disable 0618 double sum = SparseLinear.Product(x, y); return(System.Math.Tanh(Gamma * sum + Constant)); }
/// <summary> /// Polynomial kernel function. /// </summary> /// /// <param name="x">Vector <c>x</c> in input space.</param> /// <param name="y">Vector <c>y</c> in input space.</param> /// <returns>Dot product in feature (kernel) space.</returns> /// public override double Function(double[] x, double[] y) { #pragma warning disable 0618 double sum = SparseLinear.Product(x, y) + constant; return(Math.Pow(sum, Degree)); }
/// <summary> /// Polynomial kernel function. /// </summary> /// /// <param name="x">Vector <c>x</c> in input space.</param> /// <param name="y">Vector <c>y</c> in input space.</param> /// <returns>Dot product in feature (kernel) space.</returns> /// public override double Function(double[] x, double[] y) { double sum = SparseLinear.Product(x, y) + constant; return(Math.Pow(sum, Degree)); }