This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _multivariate / multivariate_normal_gen / fit

function

scipy.stats._multivariate:multivariate_normal_gen.fit

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_multivariate.py:860

Signature

def fit(self, x, fix_mean = None, fix_cov = None)

Summary

Fit a multivariate normal distribution to data.

Parameters

x : ndarray (m, n)

Data the distribution is fitted to. Must have two axes. The first axis of length m represents the number of vectors the distribution is fitted to. The second axis of length n determines the dimensionality of the fitted distribution.

fix_mean : ndarray(n, )

Fixed mean vector. Must have length n.

fix_cov: ndarray (n, n)

Fixed covariance matrix. Must have shape (n, n).

Returns

mean : ndarray (n, )

Maximum likelihood estimate of the mean vector

cov : ndarray (n, n)

Maximum likelihood estimate of the covariance matrix

Aliases

  • scipy.stats._multivariate.multivariate_normal_gen.fit