8000 FIX DBSCAN and TSNE are missing the pairwise estimator tag (#22814) · scikit-learn/scikit-learn@ae98150 · GitHub
[go: up one dir, main page]

Skip to content

Commit ae98150

Browse files
author
Raz Hoshia
authored
FIX DBSCAN and TSNE are missing the pairwise estimator tag (#22814)
1 parent 9b1978d commit ae98150

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sklearn/cluster/_dbscan.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,3 +458,6 @@ def fit_predict(self, X, y=None, sample_weight=None):
458458
"""
459459
self.fit(X, sample_weight=sample_weight)
460460
return self.labels_
461+
462+
def _more_tags(self):
463+
return {"pairwise": self.metric == "precomputed"}

sklearn/manifold/_t_sne.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,3 +1128,6 @@ def fit(self, X, y=None):
11281128
"""
11291129
self.fit_transform(X)
11301130
return self
1131+
1132+
def _more_tags(self):
1133+
return {"pairwise": self.metric == "precomputed"}

0 commit comments

Comments
 (0)
0