"""
bishop.dimensionality – PRML Chapter 12
========================================
Wraps sklearn dimensionality-reduction methods.

    from ml_ai_library.bishop.dimensionality import (
        PCA,         # PRML §12.1 – linear PCA
        KernelPCA,   # PRML §12.3 – kernel PCA
        FastICA,     # PRML §12.4 – independent component analysis
        LDA,         # PRML §4.1  – linear discriminant analysis
        TSNE,        # visualisation companion (not in PRML, common extension)
    )
"""

from sklearn.decomposition import PCA, KernelPCA, FastICA          # PRML §12
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA  # PRML §4.1
from sklearn.manifold import TSNE                                   # bonus

__all__ = ["PCA", "KernelPCA", "FastICA", "LDA", "TSNE"]

# All are direct re-exports from sklearn.
#
# PRML chapter map:
#   PCA       → §12.1   (principal component analysis, SVD-based)
#   KernelPCA → §12.3   (kernel trick applied to PCA)
#   FastICA   → §12.4   (independent component analysis)
#   LDA       → §4.1    (Fisher's linear discriminant)
#
# Example:
#   from ml_ai_library.bishop.dimensionality import PCA
#   pca = PCA(n_components=2, whiten=True)
#   Z = pca.fit_transform(X)             # low-dim projection
#   X_rec = pca.inverse_transform(Z)     # reconstruction
#   print(pca.explained_variance_ratio_) # variance per component
