Accord.Statistics.Kernels.Sparse.SparseGaussian.ReverseDistance C# (CSharp) Method

ReverseDistance() public method

Computes the squared distance in input space between two points given in feature space.
public ReverseDistance ( double x, double y ) : double
x double Vector x in feature (kernel) space.
y double Vector y in feature (kernel) space.
return double
        public double ReverseDistance(double[] x, double[] y)
        {
            if (x == y)
                return 0.0;

            double norm = SparseLinear.SquaredEuclidean(x, y);

            return -(1.0 / gamma) * Math.Log(1.0 - 0.5 * norm);
        }