# Statistical functions (`mlpy.stats`)¶

## Discrete distributions¶

 `nonuniform` A non-uniform discrete random variable. `gibbs` A Gibbs distribution discrete random variable.

## Conditional distributions¶

 `conditional_normal` Conditional Normal random variable. `conditional_student` Conditional Student random variable. `conditional_mix_normal` Conditional Mix-Normal random variable.

## Multivariate distributions¶

 `multivariate_normal` Multivariate Normal random variable. `multivariate_student` Multivariate Student random variable. `invwishart` Inverse Wishart random variable. `normal_invwishart` Normal-Inverse Wishart random variable.

## Statistical Models¶

 `markov` Markov model.

### Mixture Models¶

 `MixtureModel` Mixture model base class. `DiscreteMM` Discrete mixture model class. `GMM` Gaussian mixture model class. `StudentMM` Student mixture model class.

## Statistical functions¶

 `is_posdef` Test if matrix a is positive definite. `randpd` Create a random positive definite matrix. `stacked_randpd` Create multiple random positive definite matrices. `normalize_logspace` Normalize in log space while avoiding numerical underflow. `sq_distance` Efficiently compute squared Euclidean distances between stats of vectors. `partitioned_cov` Partition the rows of x according to y and take the covariance of each group. `partitioned_mean` Groups the rows of x according to the class labels in y and takes the mean of each group. `partitioned_sum` Groups the rows of x according to the class labels in y and sums each group. `shrink_cov` Ledoit-Wolf optimal shrinkage estimator. `canonize_labels` Transform labels to 1:k.