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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion esda/adbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,12 @@ def _one_draw(pars):
if sample_weight is not None:
thin_sample_weight = sample_weight.iloc[rids]

min_samples = min_samples * pct_exact
min_samples = 1 if min_samples < 1 else int(np.floor(min_samples))

dbs = DBSCAN(
eps=eps,
min_samples=int(np.round(min_samples * pct_exact)),
min_samples=min_samples,
algorithm=algorithm,
n_jobs=n_jobs,
).fit(X_thin[xy], sample_weight=thin_sample_weight)
Expand Down
7 changes: 0 additions & 7 deletions esda/tests/test_adbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import numpy as np
import pandas
import pytest

from .. import adbscan

Expand Down Expand Up @@ -73,9 +72,6 @@ def setUp(self):
]
)

@pytest.mark.xfail(
raises=ValueError, reason="**NEEDS ATTENTION**. Change in scikit-learn>=1.1."
)
def test_adbscan(self):
# ------------------------#
# # Single Core #
Expand Down Expand Up @@ -264,9 +260,6 @@ def setUp(self):
_ = ads.fit(self.db, xy=["x", "y"])
self.labels = pandas.Series(ads.labels_, index=self.db.index)

@pytest.mark.xfail(
raises=ValueError, reason="**NEEDS ATTENTION**. Change in scikit-learn>=1.1."
)
def test_get_cluster_boundary(self):
# ------------------------#
# # Single Core #
Expand Down