本文整理汇总了C#中numl.Math.LinearAlgebra.Vector.Norm方法的典型用法代码示例。如果您正苦于以下问题:C# Vector.Norm方法的具体用法?C# Vector.Norm怎么用?C# Vector.Norm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numl.Math.LinearAlgebra.Vector
的用法示例。
在下文中一共展示了Vector.Norm方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Predict
public override double Predict(Vector y)
{
if (Normalized)
y = y / y.Norm();
return W.Dot(y) + B;
}
示例2: Predict
/// <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: Predict
/// <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: Compute
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: Compute
/// <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: Compute
/// <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);
}