Skip to content
C

Problem 4: Manually Check the Core Point Condition

Easypython

Problem Description

Write a Python program that manually checks whether a given point qualifies as a core point, based on a given eps and min_samples, by counting its neighbors within the dataset (without using Scikit-learn's DBSCAN).

Input

A list of points, a target point, eps, and min_samples.

Output

Whether the target point qualifies as a core point, along with its neighbor count.

Constraints

  • None specific.

Example Input

text
points=[[5,5],[4,5],[6,5],[5,6],[20,20]], target=[5,5], eps=2, min_samples=3

Example Output

text
Neighbor count: 3 Is core point: True

Concepts Covered

Manual distance calculation, conditional counting.

Input (stdin)

Output

Run your code to see output here...