Random Projections¶
Generate multiple projected views from a single feature matrix.
Utilities for generating multiple random-projection views from a single matrix.
- class polyview.augmentation.random_projections.RandomProjectionViews(*args: Any, **kwargs: Any)¶
Bases:
BaseEstimatorGenerate multiple projected views from a single matrix.
This transformer is pipeline-friendly: it accepts a single 2-D matrix and outputs a
MultiViewDatasetcontainingn_viewsindependent random projections of the input.- fit(X, y=None) RandomProjectionViews¶
- fit_transform(X, y=None) MultiViewDataset¶
- transform(X) MultiViewDataset¶
- polyview.augmentation.random_projections.random_projection(X: numpy.ndarray | Sequence[Sequence[float]], n_views: int = 2, n_components: int | Sequence[int | None] | None = None, method: Literal['gaussian', 'sparse'] = 'gaussian', random_state: int | None = None, labels=None, view_names: Sequence[str] | None = None) MultiViewDataset¶
Create multiple projected views from a single 2-D matrix.
This helper is equivalent to instantiating
RandomProjectionViewsand callingfit_transform.