src.dimensionality_reduction.pca ================================ .. py:module:: src.dimensionality_reduction.pca Classes ------- .. autoapisummary:: src.dimensionality_reduction.pca.PCA Module Contents --------------- .. py:class:: PCA(n_components: int = 3) Bases: :py:obj:`dimensionality_reduction.BaseDimensionalityReduction` Attributes: ----------- n_components : int 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. .. py:attribute:: n_components .. py:attribute:: dim_reducer .. py:method:: fit_transform(embedding_method_name) Fit the PCA model to the dataset and transform the dataset. :param data: DataFrame containing the data for dimensionality reduction. :return: DataFrame with the reduced dimensions.