Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
iObs
WP2
Task 2.3
netatmoqc
Commits
e1ccbd01
Commit
e1ccbd01
authored
Jul 14, 2021
by
Paulo Medeiros
Browse files
Allow choice of HDBSCAN's cluster_selection_method
parent
38804a79
Changes
2
Hide whitespace changes
Inline
Side-by-side
netatmoqc/clustering.py
View file @
e1ccbd01
...
...
@@ -204,9 +204,9 @@ def run_clustering_on_df(
metric
=
"precomputed"
,
core_dist_n_jobs
=
n_jobs
,
allow_single_cluster
=
True
,
# Default
cluster_selection_method
: 'eom'. Sometimes it leads to
#
cluster
s that are too big. Using 'leaf' seems better.
cluster_selection_method
=
"leaf"
,
cluster_selection_method
=
config
.
get_clustering_opt
(
"
cluster
_selection_method"
)
,
).
fit
(
distance_matrix
)
elif
method
==
"optics"
:
db
=
OPTICS
(
...
...
netatmoqc/config_parser.py
View file @
e1ccbd01
...
...
@@ -417,6 +417,12 @@ with config_section("clustering_method.hdbscan") as section:
choices
=
[
None
,
"glosh"
,
"lof"
,
"iterative"
,
"reclustering"
],
)
config_metadata
.
copy_template
(
"outlier_removal.iterative"
)
# 'eom' may sometimes lead to clusters that are too big and lower
# silhouette scores, but maybe the final station selection is better
# than that using "leaf"
config_metadata
.
register
(
"cluster_selection_method"
,
default
=
"leaf"
,
choices
=
[
"eom"
,
"leaf"
]
)
# clustering_method.dbscan
with
config_section
(
"clustering_method.dbscan"
)
as
section
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment