summaryrefslogtreecommitdiff
path: root/ot/da.py
diff options
context:
space:
mode:
authorSlasnista <stan.chambon@gmail.com>2017-09-04 08:46:36 +0200
committerSlasnista <stan.chambon@gmail.com>2017-09-04 08:46:36 +0200
commit30bfc5ce5acd98991b3d01e313d0c14f0e600b14 (patch)
tree2fea996734cb29d6ded9a2b701088878c4b9ac04 /ot/da.py
parent16697047eff9326a0ecb483317c13a854a3d3a71 (diff)
correction semi supervised case
Diffstat (limited to 'ot/da.py')
-rw-r--r--ot/da.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ot/da.py b/ot/da.py
index 564c7b7..e694668 100644
--- a/ot/da.py
+++ b/ot/da.py
@@ -989,7 +989,7 @@ class BaseTransport(BaseEstimator):
# assumes labeled source samples occupy the first rows
# and labeled target samples occupy the first columns
- classes = np.unique(ys)
+ classes = [c for c in np.unique(ys) if c != -1]
for c in classes:
idx_s = np.where((ys != c) & (ys != -1))
idx_t = np.where(yt == c)