Skip to content

Commit

Permalink
mc
Browse files Browse the repository at this point in the history
  • Loading branch information
GiuliaGhisolfi committed Jan 8, 2024
1 parent 93805c8 commit b3c553f
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 12 deletions.
7 changes: 6 additions & 1 deletion TASK_2/silhouette_random_labels.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# %% [markdown]
# **Data mining Project - University of Pisa, acedemic year 2023/24**
#
# **Authors**: Giacomo Aru, Giulia Ghisolfi, Luca Marini, Irene Testa

# %%
import json
import pandas as pd
Expand Down Expand Up @@ -29,7 +34,7 @@
for n_cluster in n_clusters:
print(f'Trying {n_cluster} clusters')
silhouette_values = []
for i in range(10): # TODO: aumentare? con 10 iterazioni per una size ci mette 15 min
for i in range(10):
print(f'Iteration {i}')
labels = np.random.randint(0, n_cluster, len(indicators_df))
silhouette_values.append(silhouette_score(X, labels))
Expand Down
4 changes: 1 addition & 3 deletions TASK_4/shap_giacomo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"RANDOM_STATE = 42\n",
"NSAMPLE = 1000\n",
"NBASETRAINISTANCES = 20\n",
"SVMISTANCESTOCOMPUTE = 150 # deve essere minore di NSAMPLE e maggiore di 66\n",
"SVMISTANCESTOCOMPUTE = 150\n",
"\n",
"pd.set_option('display.max_columns', None)\n",
"pd.set_option('max_colwidth', None)\n",
Expand Down Expand Up @@ -107,8 +107,6 @@
"true_labels_test_df = pd.read_csv('../data/clf_y_test.csv', index_col=0)\n",
"true_labels_test = true_labels_test_df.values.ravel()\n",
"\n",
"\n",
"\n",
"# load the names of the features\n",
"features_db = json.loads(open('../data/clf_indicators_names_distance_based.json').read())\n",
"features_rb = json.loads(open('../data/clf_indicators_names_rule_based.json').read())\n",
Expand Down
2 changes: 1 addition & 1 deletion html/sankey_Clusterings_comparison.html

Large diffs are not rendered by default.

65 changes: 61 additions & 4 deletions html/scatter_poverty.html

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
TODO:
- fare il rendering dei notebook e linkarli qui

## Data visualization
This repository hosts also interactive data visualizations. You can access and interact with the plots by clicking the links below.

Expand Down

0 comments on commit b3c553f

Please sign in to comment.