Thanks to visit codestin.com
Credit goes to github.com

Skip to content

haversine distance for OPTICS #12480

@koushiksaha89

Description

@koushiksaha89

When i am trying to run OPTICS(min_samples=2, max_eps=epsilon, metric='precomputed', algorithm='ball_tree', rejection_ratio=0.1 , n_jobs=3).fit(distance_matrix) i am getting Metric 'precomputed' not valid. Use sorted(sklearn.neighbors.VALID_METRICS['ball_tree']) to get valid options. Metric can also be a callable function. where distance_matrix is a numpy array of harvesine distances.

Again when trying OPTICS(min_samples=2, max_eps=epsilon, metric='haversine', algorithm='ball_tree', rejection_ratio=0.1 , n_jobs=3).fit(np.radians(coordinates[:, [0, 1]])) i am getting ValueError: Unknown metric haversine.

Using Version: 0.21.dev0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions