jpt.distributions.multivariate ============================== .. py:module:: jpt.distributions.multivariate .. autoapi-nested-parse:: © Copyright 2021, Mareike Picklum, Daniel Nyga. Classes ------- .. autoapisummary:: jpt.distributions.multivariate.MultiVariateGaussian Module Contents --------------- .. py:class:: MultiVariateGaussian(mean=None, cov=None, data=None, ignore=-6000000) Bases: :py:obj:`jpt.distributions.univariate.Gaussian` Extension of :class:`dnutils.stats.Gaussian` A Multivariate Gaussian distribution that can be incrementally updated with new samples .. py:attribute:: ignore :value: -6000000 .. py:method:: cdf(intervals) Computes the CDF for a multivariate normal distribution. :param intervals: the boundaries of the integral :type intervals: list of matcalo.utils.utils.Interval .. py:method:: pdf() .. py:property:: mvg Computes the multivariate Gaussian distribution. .. py:property:: dim Returns the dimension of the distribution. .. py:property:: cov_ Returns the covariance matrix for prettyprinting (precision .2). .. py:property:: mean_ Returns the mean vector for prettyprinting (precision .2). .. py:method:: conditional(evidence) Returns a distribution conditioning on the variables in ``evidence`` following the calculations described in `Conditional distributions `_, i.e., after determining the partitions of :math:`\mu`, i.e. :math:`\mu_{1}` and :math:`\mu_{2}` as well as the partitions of :math:`\Sigma`, i.e. :math:`\Sigma_{11}, \Sigma_{12}, \Sigma_{21} \text{ and } \Sigma_{22}`, we calculate the multivariate normal :math:`N(\overline\mu,\overline\Sigma)` using .. math:: \overline\mu = \mu_{1} + \Sigma_{12}\Sigma_{22}^{-1}(a-\mu_{2}) :label: mu .. math:: \overline\Sigma = \Sigma_{11} + \Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21} :label: sigma :param evidence: the variables the returned distribution conditions on (mapping indices to values or Intervals of values) :type evidence: dict .. py:method:: plot(engine=None, **kwargs) -> Any Plots the distribution using the given engine. :param engine: Can be either one of ``["plotly", "matplotlib"]``, or an instance of a rendering engine subclassing ``DistributionRendering``. :param kwargs: The keyword arguments to pass to the engine as defined in the ``.plot_multivariate()`` function of ``DistributionRendering`` or its respective subclass defined by ``engine``. :return: the figure object of the plotting engine