Multivariate¶
Distributions over vectors, simplices, positive-definite matrices, or directions on the sphere.
MultivariateNormal(loc, scale_tril=None, *, cov=None, name)
¶
Bases: TFPDistribution, FlatNumericRecordDistribution
Multivariate normal (Gaussian) distribution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loc
|
array-like, shape ``(d,)``
|
Mean vector. |
required |
scale_tril
|
array-like, shape ``(d, d)``
|
Lower-triangular Cholesky factor of the covariance. Exactly one of scale_tril or cov must be provided. |
None
|
cov
|
array-like, shape ``(d, d)``
|
Covariance matrix (Cholesky-decomposed internally). |
None
|
name
|
str
|
Distribution name. |
required |
Source code in probpipe/distributions/multivariate.py
cov
property
¶
Full covariance matrix (computed from Cholesky factor).
Dirichlet(concentration, *, name)
¶
Bases: TFPDistribution, FlatNumericRecordDistribution
Dirichlet distribution over the probability simplex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
concentration
|
array-like, shape ``(k,)``
|
Positive concentration (alpha) parameters. |
required |
name
|
str
|
Distribution name. |
required |
Source code in probpipe/distributions/multivariate.py
Multinomial(total_count, probs=None, logits=None, *, name)
¶
Bases: TFPDistribution, FlatNumericRecordDistribution
Multinomial distribution over count vectors.
Exactly one of probs or logits must be provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
total_count
|
int or array - like
|
Number of trials. |
required |
probs
|
array-like, shape ``(k,)``
|
Event probabilities (need not be normalised). |
None
|
logits
|
array-like, shape ``(k,)``
|
Log-odds of each event. |
None
|
name
|
str
|
Distribution name. |
required |
Source code in probpipe/distributions/multivariate.py
Wishart(df, scale_tril=None, *, scale=None, name)
¶
Bases: TFPDistribution
Wishart distribution over positive-definite matrices.
Exactly one of scale_tril or scale must be provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
float or array - like
|
Degrees of freedom (must be >= dimension). |
required |
scale_tril
|
array-like, shape ``(d, d)``
|
Lower-triangular Cholesky factor of the scale matrix. |
None
|
scale
|
array-like, shape ``(d, d)``
|
Full scale matrix (Cholesky-decomposed internally). |
None
|
name
|
str
|
Distribution name. |
required |
Source code in probpipe/distributions/multivariate.py
scale
property
¶
Full scale matrix (computed from Cholesky factor).
VonMisesFisher(mean_direction, concentration, *, name)
¶
Bases: TFPDistribution, FlatNumericRecordDistribution
Von Mises-Fisher distribution on the unit hypersphere.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mean_direction
|
array-like, shape ``(d,)``
|
Unit vector giving the mean direction. |
required |
concentration
|
float or array - like
|
Scalar concentration parameter (kappa >= 0). |
required |
name
|
str
|
Distribution name. |
required |