Norm() 공개 정적인 메소드

Normals.
public static Norm ( Vector x ) : double
x Vector The Vector to process.
리턴 double
예제 #1
0
        public override double Predict(Vector y)
        {
            if (Normalized)
                y = y / y.Norm();

            return W.Dot(y) + B;
        }
예제 #2
0
        /// <summary>Predicts the given o.</summary>
        /// <param name="y">The Vector to process.</param>
        /// <returns>An object.</returns>
        public override double Predict(Vector y)
        {
            this.Preprocess(y);

            if (Normalized)
                y = y / y.Norm();

            return W.Dot(y) + B;
        }
예제 #3
0
        /// <summary>Predicts the given o.</summary>
        /// <param name="y">The Vector to process.</param>
        /// <returns>An object.</returns>
        public override double Predict(Vector y)
        {
            if (this.Normalized)
            {
                y = y / y.Norm();
            }

            return this.W.Dot(y) + this.B;
        }
예제 #4
0
 public double Compute(Vector x, Vector y)
 {
     double dot = x.Dot(y);
     return dot / (System.Math.Pow(x.Norm(), 2) + System.Math.Pow(y.Norm(), 2) - dot);
 }
예제 #5
0
 /// <summary>Computes.</summary>
 /// <param name="x">The Vector to process.</param>
 /// <param name="y">The Vector to process.</param>
 /// <returns>A double.</returns>
 public double Compute(Vector x, Vector y)
 {
     return x.Dot(y) / (x.Norm() * y.Norm());
 }
예제 #6
0
 /// <summary>Computes.</summary>
 /// <param name="x">The Vector to process.</param>
 /// <param name="y">The Vector to process.</param>
 /// <returns>A double.</returns>
 public double Compute(Vector x, Vector y)
 {
     var dot = x.Dot(y);
     return dot / (Math.Pow(x.Norm(), 2) + Math.Pow(y.Norm(), 2) - dot);
 }
예제 #7
0
 public static double Norm(this Vector v)
 {
     return(Vector.Norm(v, 2));
 }
예제 #8
0
 /// <summary>A Vector extension method that normals.</summary>
 /// <param name="v">The v to act on.</param>
 /// <param name="p">The double to process.</param>
 /// <returns>A double.</returns>
 public static double Norm(this Vector v, double p)
 {
     return(Vector.Norm(v, p));
 }