InverseWishartDistribution Class |
Namespace: Accord.Statistics.Distributions.Multivariate
[SerializableAttribute] public class InverseWishartDistribution : MatrixContinuousDistribution
The InverseWishartDistribution type exposes the following members.
Name | Description | |
---|---|---|
InverseWishartDistribution |
Creates a new Inverse Wishart distribution.
|
Name | Description | |
---|---|---|
Covariance |
Gets the variance-covariance matrix for this distribution.
(Overrides MatrixContinuousDistributionCovariance.) | |
Dimension |
Gets the number of variables for this distribution.
(Inherited from MatrixContinuousDistribution.) | |
Mean |
Gets the mean for this distribution.
(Overrides MatrixContinuousDistributionMean.) | |
Median |
Gets the median for this distribution.
(Inherited from MatrixContinuousDistribution.) | |
Mode |
Gets the mode for this distribution.
(Inherited from MatrixContinuousDistribution.) | |
NumberOfColumns |
Gets the number of columns that matrices from this distribution should have.
(Inherited from MatrixContinuousDistribution.) | |
NumberOfRows |
Gets the number of rows that matrices from this distribution should have.
(Inherited from MatrixContinuousDistribution.) | |
Variance |
Gets the variance for this distribution.
(Overrides MatrixContinuousDistributionVariance.) |
Name | Description | |
---|---|---|
Clone |
Creates a new object that is a copy of the current instance.
(Overrides DistributionBaseClone.) | |
ComplementaryDistributionFunction(Double) |
Gets the complementary cumulative distribution function
(ccdf) for this distribution evaluated at point x.
This function is also known as the Survival function.
(Inherited from MatrixContinuousDistribution.) | |
ComplementaryDistributionFunction(Double) |
Gets the complementary cumulative distribution function
(ccdf) for this distribution evaluated at point x.
This function is also known as the Survival function.
(Inherited from MatrixContinuousDistribution.) | |
DistributionFunction(Double) |
Gets the probability density function (pdf) for
this distribution evaluated at point x.
(Inherited from MatrixContinuousDistribution.) | |
DistributionFunction(Double) |
Gets the cumulative distribution function (cdf) for
this distribution evaluated at point x.
(Inherited from MatrixContinuousDistribution.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Fit(Double) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Fit(Double) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Fit(Double, IFittingOptions) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Fit(Double, Double) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Fit(Double, Int32) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Fit(Double, Double) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Fit(Double, Double, IFittingOptions) |
Not supported.
(Overrides MatrixContinuousDistributionFit(Double, Double, IFittingOptions).) | |
Fit(Double, Int32, IFittingOptions) |
Fits the underlying distribution to a given set of observations.
(Inherited from MatrixContinuousDistribution.) | |
Generate |
Generates a random observation from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Double) |
Generates a random observation from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Double) |
Generates a random observation from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Int32) |
Generates a random vector of observations from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Random) |
Generates a random observation from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Double, Random) |
Generates a random observation from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Double, Random) |
Generates a random observation from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Int32, Double) |
Generates a random vector of observations from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Int32, Double) |
Generates a random vector of observations from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Int32, Random) |
Generates a random vector of observations from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Int32, Double, Random) |
Generates a random vector of observations from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
Generate(Int32, Double, Random) |
Generates a random vector of observations from the current distribution.
(Inherited from MatrixContinuousDistribution.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InnerComplementaryDistributionFunction |
Gets the complementary cumulative distribution function
(ccdf) for this distribution evaluated at point x.
This function is also known as the Survival function.
(Inherited from MatrixContinuousDistribution.) | |
InnerDistributionFunction |
Not supported.
(Overrides MatrixContinuousDistributionInnerDistributionFunction(Double).) | |
InnerLogProbabilityDensityFunction |
Gets the probability density function (pdf) for
this distribution evaluated at point x.
(Overrides MatrixContinuousDistributionInnerLogProbabilityDensityFunction(Double).) | |
InnerProbabilityDensityFunction |
Gets the probability density function (pdf) for
this distribution evaluated at point x.
(Overrides MatrixContinuousDistributionInnerProbabilityDensityFunction(Double).) | |
LogProbabilityDensityFunction |
Gets the log-probability density function (pdf)
for this distribution evaluated at point x.
(Inherited from MatrixContinuousDistribution.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProbabilityDensityFunction |
Gets the probability density function (pdf) for
this distribution evaluated at point x.
(Inherited from MatrixContinuousDistribution.) | |
ToString |
Returns a String that represents this instance.
(Inherited from DistributionBase.) | |
ToString(IFormatProvider) |
Returns a String that represents this instance.
(Inherited from DistributionBase.) | |
ToString(String) |
Returns a String that represents this instance.
(Inherited from DistributionBase.) | |
ToString(String, IFormatProvider) |
Returns a String that represents this instance.
(Overrides DistributionBaseToString(String, IFormatProvider).) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
The inverse Wishart distribution, also called the inverted Wishart distribution, is a probability distribution defined on real-valued positive-definite matrices. In Bayesian statistics it is used as the conjugate prior for the covariance matrix of a multivariate normal distribution.
References:
// Create a Inverse Wishart with the parameters var invWishart = new InverseWishartDistribution( // Degrees of freedom degreesOfFreedom: 4, // Scale parameter inverseScale: new double[,] { { 1.7, -0.2 }, { -0.2, 5.3 }, } ); // Common measures double[] var = invWishart.Variance; // { -3.4, -10.6 } double[,] cov = invWishart.Covariance; // see below double[,] mmean = invWishart.MeanMatrix; // see below // cov mean // -5.78 -4.56 1.7 -0.2 // -4.56 -56.18 -0.2 5.3 // (the above matrix representations have been transcribed to text using) string scov = cov.ToString(DefaultMatrixFormatProvider.InvariantCulture); string smean = mmean.ToString(DefaultMatrixFormatProvider.InvariantCulture); // For compatibility reasons, .Mean stores a flattened mean matrix double[] mean = invWishart.Mean; // { 1.7, -0.2, -0.2, 5.3 } // Probability density functions double pdf = invWishart.ProbabilityDensityFunction(new double[,] { { 5.2, 0.2 }, // 0.000029806281690351203 { 0.2, 4.2 }, }); double lpdf = invWishart.LogProbabilityDensityFunction(new double[,] { { 5.2, 0.2 }, // -10.420791391688828 { 0.2, 4.2 }, });