diff options
author | aje <leo_g_autheron@hotmail.fr> | 2017-08-29 15:38:11 +0200 |
---|---|---|
committer | aje <leo_g_autheron@hotmail.fr> | 2017-08-29 15:38:11 +0200 |
commit | 3cecc18f53453e79ccc00484e6cbfaa5643f269c (patch) | |
tree | 1d9879cb0ed12d280b14121ccad90946682465f1 /ot/da.py | |
parent | a2ec6e55e458c719484e86a4e6a6e764c2e38dc8 (diff) |
Changes to LP solver:
- Allow to modify the maximal number of iterations
- Display an error message in the python console if the solver encountered an issue
Diffstat (limited to 'ot/da.py')
-rw-r--r-- | ot/da.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -658,7 +658,7 @@ class OTDA(object): self.metric = metric self.computed = False - def fit(self, xs, xt, ws=None, wt=None, norm=None): + def fit(self, xs, xt, ws=None, wt=None, norm=None, numItermax=10000): """Fit domain adaptation between samples is xs and xt (with optional weights)""" self.xs = xs @@ -674,7 +674,7 @@ class OTDA(object): self.M = dist(xs, xt, metric=self.metric) self.normalizeM(norm) - self.G = emd(ws, wt, self.M) + self.G = emd(ws, wt, self.M, numItermax) self.computed = True def interp(self, direction=1): |