Skip to content

if min_samples>1, then def dbscan_reduce errors out #8

@gauravagnihotri

Description

@gauravagnihotri

I think this particular piece of code causes error
num_clusters = len(set(cluster_labels))

clusters = pd.Series([coords[cluster_labels==n] for n in range(num_clusters)])

since when min_samples>1, there are points that are considered 'noisy' and get a label '-1'
that label should be discarded,

cluster_set = set(cluster_labels)

if -1 in cluster_set: cluster_set.remove(-1)

num_clusters = len(cluster_set)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions