diff --git a/examples/cluster/plot_cluster_comparison.py b/examples/cluster/plot_cluster_comparison.py index 802f3996bbe7e..8b52759c79018 100644 --- a/examples/cluster/plot_cluster_comparison.py +++ b/examples/cluster/plot_cluster_comparison.py @@ -41,7 +41,7 @@ # Generate datasets. We choose the size big enough to see the scalability # of the algorithms, but not too big to avoid too long running times # ============ -n_samples = 1500 +n_samples = 500 noisy_circles = datasets.make_circles(n_samples=n_samples, factor=0.5, noise=0.05) noisy_moons = datasets.make_moons(n_samples=n_samples, noise=0.05) blobs = datasets.make_blobs(n_samples=n_samples, random_state=8) @@ -74,9 +74,9 @@ "eps": 0.3, "damping": 0.9, "preference": -200, - "n_neighbors": 10, + "n_neighbors": 3, "n_clusters": 3, - "min_samples": 20, + "min_samples": 7, "xi": 0.05, "min_cluster_size": 0.1, } @@ -89,18 +89,27 @@ "preference": -240, "quantile": 0.2, "n_clusters": 2, - "min_samples": 20, - "xi": 0.25, + "min_samples": 7, + "xi": 0.08, + }, + ), + ( + noisy_moons, + { + "damping": 0.75, + "preference": -220, + "n_clusters": 2, + "min_samples": 7, + "xi": 0.1, }, ), - (noisy_moons, {"damping": 0.75, "preference": -220, "n_clusters": 2}), ( varied, { "eps": 0.18, "n_neighbors": 2, - "min_samples": 5, - "xi": 0.035, + "min_samples": 7, + "xi": 0.01, "min_cluster_size": 0.2, }, ), @@ -109,12 +118,12 @@ { "eps": 0.15, "n_neighbors": 2, - "min_samples": 20, + "min_samples": 7, "xi": 0.1, "min_cluster_size": 0.2, }, ), - (blobs, {}), + (blobs, {"min_samples": 7, "xi": 0.1, "min_cluster_size": 0.2}), (no_structure, {}), ]