A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://torchdr.github.io/dev/gen_modules/torchdr.KernelPCA.html below:

KernelPCA — TorchDR 0.3 documentation

KernelPCA#
class torchdr.KernelPCA(affinity: Affinity = GaussianAffinity(), n_components: int = 2, device: str = 'auto', backend: str | None = None, verbose: bool = False, random_state: float | None = None, nodiag: bool = False, **kwargs)[source]#

Bases: DRModule

Kernel Principal Component Analysis module.

Parameters:
  • affinity (Affinity, default=GaussianAffinity()) – Affinity object to compute the kernel matrix.

  • n_components (int, default=2) – Number of components to project the input data onto.

  • device (str, default="auto") – Device on which the computations are performed.

  • backend ({"keops", "faiss", None}, optional) – Which backend to use for handling sparsity and memory efficiency. Default is None.

  • verbose (bool, default=False) – Whether to print information during the computations.

  • random_state (float, default=None) – Random seed for reproducibility.

  • nodiag (bool, default=False) – Whether to remove eigenvectors with a zero eigenvalue.

transform(X: Tensor | ndarray) Tensor | ndarray[source]#

Project the input data onto the KernelPCA components.

Parameters:

X (torch.Tensor or np.ndarray of shape (n_samples, n_features)) – Data to project onto the KernelPCA components.

Returns:

X_new – Projected data.

Return type:

torch.Tensor or np.ndarray of shape (n_samples, n_components)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4