src.dimensionality_reduction ============================ .. py:module:: src.dimensionality_reduction Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/src/dimensionality_reduction/pca/index /autoapi/src/dimensionality_reduction/tsne/index /autoapi/src/dimensionality_reduction/umap_reducer/index Attributes ---------- .. autoapisummary:: src.dimensionality_reduction.logger Classes ------- .. autoapisummary:: src.dimensionality_reduction.BaseDimensionalityReduction Functions --------- .. autoapisummary:: src.dimensionality_reduction.get_dr_model Package Contents ---------------- .. py:data:: logger .. py:class:: BaseDimensionalityReduction(n_components: int = 3) Base class for dimensionality reduction models. Attributes: ----------- n_components : int The number of dimensions to reduce the data to. transformed_data : pd.DataFrame or None DataFrame containing the reduced dimensionality data. Attributes: ----------- data : pd.DataFrame or None DataFrame containing the data to be clustered. labels : pd.Series or None Series containing the cluster labels assigned to the data. Methods: -------- load_data(file_path: str) -> pd.DataFrame: Loads a dataset from a CSV or pickle file into a pandas DataFrame. save_labels(file_path: str): Saves the cluster labels to a CSV or pickle file. .. py:attribute:: n_components .. py:attribute:: transformed_data :value: None .. py:attribute:: data :value: None .. py:method:: load_data(embedding_method_name) .. py:method:: scale_data(data) .. py:method:: save_transformed_data(dimred_method_name: str, embedding_method_name: str, reduced_data: pandas.DataFrame) .. py:function:: get_dr_model(method_name: str, dask_client: dask.distributed.client.Client or None = None)