Multivariate normal density in Python?

后端 未结 10 1295
星月不相逢
星月不相逢 2021-01-30 19:42

Is there any python package that allows the efficient computation of the PDF (probability density function) of a multivariate normal distribution?

It doesn\'t seem to be

10条回答
  •  萌比男神i
    2021-01-30 20:40

    I know of several python packages that use it internally, with different generality and for different uses, but I don't know if any of them are intended for users.

    statsmodels, for example, has the following hidden function and class, but it's not used by statsmodels:

    https://github.com/statsmodels/statsmodels/blob/master/statsmodels/miscmodels/try_mlecov.py#L36

    https://github.com/statsmodels/statsmodels/blob/master/statsmodels/sandbox/distributions/mv_normal.py#L777

    Essentially, if you need fast evaluation, rewrite it for your use case.

提交回复
热议问题