sequince_density.gmm.sklearn
============================

.. py:module:: sequince_density.gmm.sklearn

.. autoapi-nested-parse::

   Scikit-learn Gaussian-mixture proposal adapter.



Classes
-------

.. autoapisummary::

   sequince_density.gmm.sklearn.GaussianMixtureProposal


Module Contents
---------------

.. py:class:: GaussianMixtureProposal(n_components, *, covariance_type = 'full', regularization = 1e-06, max_iter = 100, tol = 0.0001)

   Full-covariance Gaussian mixture fitted with scikit-learn.

   Fitting runs eagerly on CPU NumPy arrays. Density values and samples are
   restored to the namespace and device of the relevant input particles.
   Sampling uses :class:`orng.RandomGenerator` rather than sklearn's internal
   random state.

   Weighted fitting is not supported by ``sklearn.mixture.GaussianMixture``.
   The optional ``weights`` argument is accepted only to validate uniform SMC
   weights explicitly.


   .. py:attribute:: n_components


   .. py:attribute:: covariance_type
      :value: 'full'



   .. py:attribute:: regularization


   .. py:attribute:: max_iter
      :value: 100



   .. py:attribute:: tol


   .. py:property:: mixture_weights
      :type: numpy.ndarray



   .. py:property:: means
      :type: numpy.ndarray



   .. py:property:: covariances
      :type: numpy.ndarray



   .. py:property:: converged
      :type: bool



   .. py:property:: n_iter
      :type: int



   .. py:property:: diagnostics
      :type: dict[str, Any]


      Return fit diagnostics consumed by proposal rejuvenation.


   .. py:method:: fit(particles, context = None, *, rng = None, weights = None)

      Fit the mixture to a two-dimensional particle array.



   .. py:method:: log_prob(particles, context = None)


   .. py:method:: sample(n_samples, context = None, *, rng = None, xp = None)


   .. py:method:: sample_and_log_prob(n_samples, context = None, *, rng = None, xp = None)


   .. py:method:: state_dict()


   .. py:method:: load_state_dict(state)


