Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DenseClus Implementation notebook for jumpstart #60

Merged
merged 17 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions denseclus/DenseClus.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ def evaluate(self) -> np.array:
clustered = labels >= 0

if isinstance(self.hdbscan_, dict) or self.umap_combine_method == "ensemble":
print(f"DBCV score {self.hdbscan_['hdb_numerical'].relative_validity_}")
print(f"DBCV score {self.hdbscan_['hdb_categorical'].relative_validity_}")
print(f"DBCV numerical score {self.hdbscan_['hdb_numerical'].relative_validity_}")
print(f"DBCV categorical score {self.hdbscan_['hdb_categorical'].relative_validity_}")
embedding_len = self.numerical_umap_.embedding_.shape[0]
coverage = np.sum(clustered) / embedding_len
print(f"Coverage {coverage}")
Expand Down
2 changes: 2 additions & 0 deletions notebooks/02_TuningWithHDBSCAN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@
],
"source": [
"# we will make our own scorer for DBCV\n",
"\n",
"\n",
"def dbcv_score(X, labels):\n",
" return validity_index(X, labels)\n",
"\n",
Expand Down
Loading
Loading