sequince_density.gmm.sklearn#
Scikit-learn Gaussian-mixture proposal adapter.
Classes#
Full-covariance Gaussian mixture fitted with scikit-learn. |
Module Contents#
- class sequince_density.gmm.sklearn.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
orng.RandomGeneratorrather than sklearn’s internal random state.Weighted fitting is not supported by
sklearn.mixture.GaussianMixture. The optionalweightsargument is accepted only to validate uniform SMC weights explicitly.- Parameters:
- n_components#
- covariance_type = 'full'#
- regularization#
- max_iter = 100#
- tol#
- property mixture_weights: numpy.ndarray#
- Return type:
- property means: numpy.ndarray#
- Return type:
- property covariances: numpy.ndarray#
- Return type:
- fit(particles, context=None, *, rng=None, weights=None)#
Fit the mixture to a two-dimensional particle array.
- Parameters:
particles (Any)
context (Any | None)
rng (orng.RandomGenerator | int | None)
weights (Any | None)
- Return type:
- log_prob(particles, context=None)#
- Parameters:
particles (Any)
context (Any | None)
- sample(n_samples, context=None, *, rng=None, xp=None)#
- sample_and_log_prob(n_samples, context=None, *, rng=None, xp=None)#
- load_state_dict(state)#
- Parameters:
state (collections.abc.Mapping[str, Any])
- Return type:
None