diff --git a/.gitignore b/.gitignore index eada3cc31..7ccb640e4 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ simba/sandbox _build/html/ docs/_build /docs/_build/ +/simba/sandbox/ diff --git a/simba/mixins/statistics_mixin.py b/simba/mixins/statistics_mixin.py index a2a2d7995..90ac78021 100644 --- a/simba/mixins/statistics_mixin.py +++ b/simba/mixins/statistics_mixin.py @@ -3906,6 +3906,7 @@ def calinski_harabasz(x: np.ndarray, y: np.ndarray) -> float: :return: Calinski-Harabasz score. :float: float + :example: :example: >>> x = np.random.random((100, 2)).astype(np.float32) >>> y = np.random.randint(0, 100, (100,)).astype(np.int64) diff --git a/simba/unsupervised/cluster_validation_calculator.py b/simba/unsupervised/cluster_validation_calculator.py index 37bc9c35d..944fcf3ae 100644 --- a/simba/unsupervised/cluster_validation_calculator.py +++ b/simba/unsupervised/cluster_validation_calculator.py @@ -112,8 +112,8 @@ def save(self): ) -# calculator = ClusterValidators(config_path='/Users/simon/Desktop/envs/NG_Unsupervised/project_folder/project_config.ini', -# data_path='/Users/simon/Desktop/envs/NG_Unsupervised/project_folder/small_clusters', -# validator_func=Statistics.calinski_harabasz) -# calculator.run() -# calculator.save() +calculator = ClusterValidators(config_path='/Users/simon/Desktop/envs/NG_Unsupervised/project_folder/project_config.ini', + data_path='/Users/simon/Desktop/envs/NG_Unsupervised/project_folder/small_clusters', + validator_func=Statistics.calinski_harabasz) +calculator.run() +calculator.save()