Added a simple description of the space.
Browse files- app.py +9 -0
- requirements.txt +2 -0
app.py
CHANGED
|
@@ -110,7 +110,16 @@ def agg_cluster(n_feats, measure):
|
|
| 110 |
dist_plot = plot_distances(measure, X, y)
|
| 111 |
return gt_plt, cluster_waves_plot, dist_plot
|
| 112 |
|
|
|
|
| 113 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
with gr.Row():
|
| 115 |
with gr.Column():
|
| 116 |
n_feats = gr.Slider(10, 4000, 2000, label="Number of Features")
|
|
|
|
| 110 |
dist_plot = plot_distances(measure, X, y)
|
| 111 |
return gt_plt, cluster_waves_plot, dist_plot
|
| 112 |
|
| 113 |
+
title = "Agglomerative clustering with different metrics"
|
| 114 |
with gr.Blocks() as demo:
|
| 115 |
+
gr.Markdown(f" # {title}")
|
| 116 |
+
gr.Markdown(
|
| 117 |
+
"""
|
| 118 |
+
This example demonstrates the effect of different metrics on hierarchical clustering.
|
| 119 |
+
|
| 120 |
+
This is based on the example [here](https://scikit-learn.org/stable/auto_examples/cluster/plot_agglomerative_clustering_metrics.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-metrics-py)
|
| 121 |
+
"""
|
| 122 |
+
)
|
| 123 |
with gr.Row():
|
| 124 |
with gr.Column():
|
| 125 |
n_feats = gr.Slider(10, 4000, 2000, label="Number of Features")
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
matplotlib==3.6.3
|
| 2 |
+
scikit-learn==1.2.2
|