diff options
author | Slasnista <stan.chambon@gmail.com> | 2017-08-23 14:11:13 +0200 |
---|---|---|
committer | Slasnista <stan.chambon@gmail.com> | 2017-08-23 14:11:13 +0200 |
commit | 326d163db029515c338a963978a5d95948f78c29 (patch) | |
tree | 0a40e7d918e429f6d17fdb1ab4656f2a2c31f07c /ot/da.py | |
parent | 791a4a6f215033a75d5f56cd16fe2412301bec14 (diff) |
test functions for MappingTransport Class
Diffstat (limited to 'ot/da.py')
-rw-r--r-- | ot/da.py | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -1665,8 +1665,14 @@ class MappingTransport(BaseEstimator): Attributes ---------- - coupling_ : the optimal coupling - mapping_ : the mapping associated + coupling_ : array-like, shape (n_source_samples, n_features) + The optimal coupling + mapping_ : array-like, shape (n_features (+ 1), n_features) + (if bias) for kernel == linear + The associated mapping + + array-like, shape (n_source_samples (+ 1), n_features) + (if bias) for kernel == gaussian References ---------- @@ -1679,20 +1685,22 @@ class MappingTransport(BaseEstimator): def __init__(self, mu=1, eta=0.001, bias=False, metric="sqeuclidean", kernel="linear", sigma=1, max_iter=100, tol=1e-5, - max_inner_iter=10, inner_tol=1e-6, log=False, verbose=False): + max_inner_iter=10, inner_tol=1e-6, log=False, verbose=False, + verbose2=False): self.metric = metric self.mu = mu self.eta = eta self.bias = bias self.kernel = kernel - self.sigma + self.sigma = sigma self.max_iter = max_iter self.tol = tol self.max_inner_iter = max_inner_iter self.inner_tol = inner_tol self.log = log self.verbose = verbose + self.verbose2 = verbose2 def fit(self, Xs=None, ys=None, Xt=None, yt=None): """Builds an optimal coupling and estimates the associated mapping @@ -1712,7 +1720,7 @@ class MappingTransport(BaseEstimator): Returns ------- self : object - Returns self. + Returns self """ self.Xs = Xs |