src.dimensionality_reduction.pca

Classes

PCA

Attributes:

Module Contents

class src.dimensionality_reduction.pca.PCA(n_components: int = 3)

Bases: dimensionality_reduction.BaseDimensionalityReduction

Attributes:

n_componentsint

The number of principal components to compute.

Methods:

fit_transform(data: pd.DataFrame) -> pd.DataFrame:

Fit the PCA model to the data and transform it.

n_components
dim_reducer
fit_transform(embedding_method_name)

Fit the PCA model to the dataset and transform the dataset.

Parameters:

data – DataFrame containing the data for dimensionality reduction.

Returns:

DataFrame with the reduced dimensions.