public static Gaussian Uniform()
        {
            Gaussian result = new Gaussian();

            result.SetToUniform();
            return(result);
        }
 /// <summary>
 /// Predictive Variance at a given point
 /// </summary>
 /// <param name="X">Input</param>
 /// <returns>Predictive variance</returns>
 public double Variance(Vector X)
 {
     if (IsUniform())
     {
         Gaussian temp = new Gaussian();
         temp.SetToUniform();
         return(temp.GetVariance());
     }
     else
     {
         Vector kxB = FixedParameters.KernelOf_X_B(X);
         return(FixedParameters.Prior.Variance(X) - Beta.QuadraticForm(kxB));
     }
 }
Пример #3
0
 /// <summary>
 /// Set the distribution to uniform, keeping the same period
 /// </summary>
 public void SetToUniform()
 {
     Gaussian.SetToUniform();
 }
Пример #4
0
 /// <summary>
 /// Set the distribution to uniform with infinite bounds
 /// </summary>
 public void SetToUniform()
 {
     Gaussian.SetToUniform();
     LowerBound = double.NegativeInfinity;
     UpperBound = double.PositiveInfinity;
 }