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

Introduce minPoints option #156

Merged
merged 2 commits into from Jun 2, 2020
Merged

Introduce minPoints option #156

merged 2 commits into from Jun 2, 2020

Conversation

@mourner
Copy link
Member

@mourner mourner commented Jun 1, 2020

Adds an option to set the minimum points required to form a cluster (2 by default).

  • Cover with tests.
  • Find out why unaffected clusters change slightly in the demo.
mourner added 2 commits Jun 1, 2020
@mourner mourner merged commit ccb429c into master Jun 2, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@mourner mourner deleted the feature-min-points branch Jun 2, 2020
} else { // left points as unclustered
clusters.push(p);

if (numPoints > 1) {

This comment has been minimized.

@zmiao

zmiao Jun 3, 2020

I am curious why we compare numPoints with 1 instead of numPointsOrigin?

This comment has been minimized.

@mourner

mourner Jun 3, 2020
Author Member

When numPointsOrigin is bigger than 1, it means that the origin is itself a cluster, which could only be formed from minPoints points or more. So in case of origin cluster, we never reach this else case (numPoints will always be >= minPoints).

This comment has been minimized.

@zmiao

zmiao Jun 3, 2020

I see! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.