Click or drag to resize
TruncatedGaussian Structure
Microsoft Research
A distribution over real numbers between an upper and lower bound. If both bounds are infinite, it reduces to an ordinary Gaussian distribution.

Namespace: MicrosoftResearch.Infer.Distributions
Assembly: Infer.Runtime (in Infer.Runtime.dll) Version: 2.6.41128.1 (2.6.41128.1)
public struct TruncatedGaussian : IDistribution<double>, 
	ICloneable, HasPoint<double>, CanGetLogProb<double>, 
	SettableTo<TruncatedGaussian>, Diffable, SettableToProduct<TruncatedGaussian>, 
	SettableToProduct<TruncatedGaussian, TruncatedGaussian>, SettableToUniform, SettableToRatio<TruncatedGaussian>, 
	SettableToRatio<TruncatedGaussian, TruncatedGaussian>, SettableToPower<TruncatedGaussian>, 
	Sampleable<double>, SettableToWeightedSum<TruncatedGaussian>, CanGetMean<double>, 
	CanGetVariance<double>, CanGetMeanAndVarianceOut<double, double>, 
	CanGetLogNormalizer, CanGetLogAverageOf<TruncatedGaussian>, CanGetLogAverageOfPower<TruncatedGaussian>, 

The TruncatedGaussian type exposes the following members.

Public methodTruncatedGaussian(Gaussian)
Create a truncated Gaussian equivalent to a Gaussian, i.e. with no truncation.
Public methodTruncatedGaussian(TruncatedGaussian)
Create a new TruncatedGaussian distribution equal to that
Public methodTruncatedGaussian(Gaussian, Double, Double)
Create a truncated Gaussian from a Gaussian and bounds
Public methodTruncatedGaussian(Double, Double, Double, Double)
Create a truncated Gaussian from untruncated (mean, variance) and bounds
Public methodClone
Make a deep copy of this distribution.
Public methodStatic memberFromGaussian
Create a truncated Gaussian equivalent to a Gaussian, i.e. with no truncation.
Public methodGetAverageLog
Get the average logarithm of that distribution under this distribution, i.e. int this(x) log( that(x) ) dx
Public methodGetLogAverageOf
Get the logarithm of the average value of that distribution under this distribution, i.e. log(int this(x) that(x) dx)
Public methodGetLogAverageOfPower
Get the integral of this distribution times another distribution raised to a power.
Public methodGetLogNormalizer
Gets the log of the normalizer for the Gaussian density function
Public methodGetLogProb
Get the log probability density at value.
Public methodGetMean
Returns the mean (first moment) of the distribution
Public methodGetMeanAndVariance
Get the mean and variance after truncation.
Public methodGetVariance
Get the variance of this distribution
Public methodIsProper
Returns true if this distribution is proper
Public methodIsUniform
Asks whether this instance is uniform. If the upper and lower bounds are finite the distribution is not uniform.
Public methodMaxDiff
The maximum difference between the parameters of this distribution and that
Public methodStatic memberPointMass
Create a point mass distribution.
Public methodSample
Sample from the distribution
Public methodSample(Double)
Sample from the distribution
Public methodStatic memberSample(Double, Double, Double, Double)
Sample from a TruncatedGaussian distribution with the specified parameters
Public methodSetTo
Set this distribution equal to value.
Public methodSetToPower
Set this equal to (dist)^exponent
Public methodSetToProduct
Set this distribution equal to the product of a and b
Public methodSetToRatio
Set this equal to numerator/denominator
Public methodSetToSum
Set the parameters to match the moments of a mixture distribution.
Public methodSetToUniform
Set the distribution to uniform with infinite bounds
Public methodToGaussian
Get the Gaussian with the same moments as this truncated Gaussian.
Public methodStatic memberUniform
Construct a uniform truncated Gaussian. This is mathematically equivalent to a uniform Gaussian.
Public operatorStatic memberDivision
Operator overload for division
Public operatorStatic memberEquality
Equals operator
Public operatorStatic memberExclusiveOr
Operator overload for exponentation
Public operatorStatic memberInequality
Not equals operator
Public operatorStatic memberMultiply
Operator overload for product.
Public fieldGaussian
Untruncated Gaussian
Public fieldLowerBound
Lower bound
Public fieldUpperBound
Upper bound
Public propertyIsPointMass
True if the distribution is a point mass.
Public propertyPoint
Set this distribution to a point mass, or get its location
The distribution is parameterized by a Gaussian and two real numbers (LowerBound, UpperBound). Between the bounds, the density is proportional to the Gaussian. Outside of the bounds, the density is zero.
See Also