Class Distribution<T>
Static class which implements useful functions on distributions.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public static class Distribution<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
Array<Distribution>(Distribution[])
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[]> Array<Distribution>(Distribution[] array)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Distribution[] | array | The distribution of each element. |
Returns
Type | Description |
---|---|
IDistribution<T[]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Distribution[][])
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[][]> Array<Distribution>(Distribution[][] array)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Distribution[][] | array | The distribution of each element. |
Returns
Type | Description |
---|---|
IDistribution<T[][]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Distribution[][][])
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[][][]> Array<Distribution>(Distribution[][][] array)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Distribution[][][] | array | The distribution of each element. |
Returns
Type | Description |
---|---|
IDistribution<T[][][]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Distribution[][,])
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[][, ]> Array<Distribution>(Distribution[][, ] array)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Distribution[][,] | array | The distribution of each element. |
Returns
Type | Description |
---|---|
IDistribution<T[][,]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Distribution[,])
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[, ]> Array<Distribution>(Distribution[, ] array)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Distribution[,] | array | The distribution of each element. |
Returns
Type | Description |
---|---|
IDistribution<T[,]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Distribution[,][])
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[, ][]> Array<Distribution>(Distribution[, ][] array)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Distribution[,][] | array | The distribution of each element. |
Returns
Type | Description |
---|---|
IDistribution<T[,][]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Int32, Func<Int32, Distribution>)
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[]> Array<Distribution>(int length, Func<int, Distribution> init)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Int32 | length | The length of the array. |
Func<Int32, Distribution> | init | A function providing the distribution of each array element. |
Returns
Type | Description |
---|---|
IDistribution<T[]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
Array<Distribution>(Int32, Int32, Func<Int32, Int32, Distribution>)
Create a distribution over an array domain from independent distributions over the elements.
Declaration
public static IDistribution<T[, ]> Array<Distribution>(int length1, int length2, Func<int, int, Distribution> init)
where Distribution : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
Int32 | length1 | The first dimension of the array. |
Int32 | length2 | The second dimension of the array. |
Func<Int32, Int32, Distribution> | init | A function providing the distribution of each array element. |
Returns
Type | Description |
---|---|
IDistribution<T[,]> | A single distribution object over the array domain. |
Type Parameters
Name | Description |
---|---|
Distribution | Distribution type for an array element. |
GetLogAverageOf<TDistribution>(TDistribution, TDistribution, out TDistribution)
Computes the log-probability that two distributions would draw the same sample.
Declaration
public static double GetLogAverageOf<TDistribution>(TDistribution distribution1, TDistribution distribution2, out TDistribution product)
where TDistribution : IDistribution<T>, SettableToProduct<TDistribution>, CanGetLogAverageOf<TDistribution>, new()
Parameters
Type | Name | Description |
---|---|---|
TDistribution | distribution1 | The first distribution. |
TDistribution | distribution2 | The second distribution. |
TDistribution | product | The product of the distributions will be returned in this argument. If the product is zero, the value is undefined. |
Returns
Type | Description |
---|---|
Double | The log-probability that two distributions would draw the same sample. |
Type Parameters
Name | Description |
---|---|
TDistribution | The type of a distribution. |