"""
bishop.mixture_models – PRML Chapter 9
=======================================
Wraps sklearn's GMM / BayesianGMM (EM algorithm) and K-Means.

    from ml_ai_library.bishop.mixture_models import (
        GaussianMixture,        # sklearn wrapper – EM (PRML §9.2)
        BayesianGaussianMixture,# sklearn wrapper – variational EM (PRML §10.2)
        KMeans,                 # sklearn wrapper (PRML §9.1)
    )
"""

from sklearn.mixture import GaussianMixture, BayesianGaussianMixture
from sklearn.cluster import KMeans

__all__ = ["GaussianMixture", "BayesianGaussianMixture", "KMeans"]

# All three classes are direct re-exports from sklearn.
# See sklearn docs for full API; they follow the PRML EM derivation exactly.
#
# Quick reference (PRML chapter mapping):
#   GaussianMixture           → PRML §9.2  (standard EM for GMMs)
#   BayesianGaussianMixture   → PRML §10.2 (variational Bayes GMM)
#   KMeans                    → PRML §9.1  (hard-assignment EM limit)
#
# Example:
#   from ml_ai_library.bishop.mixture_models import GaussianMixture
#   gmm = GaussianMixture(n_components=3, covariance_type="full", max_iter=200)
#   gmm.fit(X)
#   labels   = gmm.predict(X)
#   log_prob = gmm.score(X)          # log-likelihood per sample
#   resp     = gmm.predict_proba(X)  # soft responsibilities γ(z_{nk})
