BaseClustering
Bases: BlueMathModel
Base class for all clustering BlueMath models. This class provides the basic structure for all clustering models.
Methods:
Name | Description |
---|---|
fit |
|
predict |
|
fit_predict |
|
plot_selected_centroids |
data_color: str = "blue", centroids_color: str = "red", **kwargs |
) -> Tuple[plt.figure, plt.axes] |
|
plot_data_as_clusters |
data: pd.DataFrame, nearest_centroids: np.ndarray, **kwargs |
) -> Tuple[plt.figure, plt.axes] |
|
fit(*args, **kwargs)
abstractmethod
Fits the model to the data.
Parameters: |
|
---|
fit_predict(*args, **kwargs)
abstractmethod
Fits the model to the data and predicts the clusters.
Parameters: |
|
---|
plot_data_as_clusters(data, nearest_centroids, **kwargs)
Plots data as nearest clusters.
Parameters: |
|
---|
Returns: |
|
---|
plot_selected_centroids(data_color='blue', centroids_color='red', **kwargs)
Plots data and selected centroids on a scatter plot matrix.
Parameters: |
|
---|
Returns: |
|
---|
Raises: |
|
---|
predict(*args, **kwargs)
abstractmethod
Predicts the clusters for the provided data.
Parameters: |
|
---|
BaseReduction
Bases: BlueMathModel
Base class for all dimensionality reduction BlueMath models. This class provides the basic structure for all dimensionality reduction models.
BaseSampling
Bases: BlueMathModel
Base class for all sampling BlueMath models. This class provides the basic structure for all sampling models.
Methods:
Name | Description |
---|---|
generate |
|
generate(*args, **kwargs)
abstractmethod
Generates samples.
Parameters: |
|
---|
Returns: |
|
---|
plot_generated_data(data_color='blue', **kwargs)
Plots the generated data on a scatter plot matrix.
Parameters: |
|
---|
Returns: |
|
---|
Raises: |
|
---|
ClusteringComparator
Class for comparing clustering models.
__init__(list_of_models)
Initializes the ClusteringComparator class.
fit(data, directional_variables=[], custom_scale_factor={})
Fits the clustering models.
plot_data_as_clusters(data)
Plots the data as clusters for the clustering models.
plot_selected_centroids()
Plots the selected centroids for the clustering models.