code: def region_est_ellipsoid(self, level=0.95, tol=0.0001, modelparam_slice=None):
          r
          _, vertices = self.region_est_hull(level=level, modelparam_slice=modelparam_slice)
  
          A, centroid = u.mvee(vertices, tol)
          return A, centroid
docs: r"""
          Estimates a credible region over models by finding the minimum volume
          enclosing ellipse (MVEE) of a credible subset of particles.
  
          :param float level: The desired crediblity level (see
              :meth:`SMCUpdater.est_credible_region`).
          :param float tol: The allowed error tolerance in the MVEE optimization
              (see :meth:`~qinfer.utils.mvee`).
          :param slice modelparam_slice: Slice over which model parameters
              to consider.
  
          :return: A tuple ``(A, c)`` where ``A`` is the covariance
              matrix of the ellipsoid and ``c`` is the center.
              A point :math:`\vec{x}` is in the ellipsoid whenever
              :math:`(\vec{x}-\vec{c})^{T}A^{-1}(\vec{x}-\vec{c})\leq 1`.
          :rtype: ``A`` is ``np.ndarray`` of shape ``(n_mps,n_mps)`` and
              ``centroid`` is ``np.ndarray`` of shape ``(n_mps)``.
              ``n_mps`` corresponds to the size of ``param_slice``.