summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Gramfort <alexandre.gramfort@m4x.org>2017-07-12 23:19:09 +0200
committerAlexandre Gramfort <alexandre.gramfort@m4x.org>2017-07-20 14:05:12 +0200
commitda21b9888e77f7512727a4f50c60bd475e2c9606 (patch)
tree3291e5149101f51d73c32daa46d856321b9166dc
parent6d7fd7e9faffa777cef222bdfc48c7ad732ab950 (diff)
pep8
-rw-r--r--examples/plot_OTDA_mapping_color_images.py3
-rw-r--r--examples/plot_WDA.py3
-rw-r--r--examples/plot_optim_OTreg.py1
3 files changed, 5 insertions, 2 deletions
diff --git a/examples/plot_OTDA_mapping_color_images.py b/examples/plot_OTDA_mapping_color_images.py
index b42dcdc..85c4b6b 100644
--- a/examples/plot_OTDA_mapping_color_images.py
+++ b/examples/plot_OTDA_mapping_color_images.py
@@ -36,6 +36,7 @@ pl.axis('off')
pl.title('Image 2')
pl.tight_layout()
+
#%% Image conversion and dataset generation
def im2mat(I):
@@ -78,7 +79,9 @@ pl.ylabel('Blue')
pl.title('Image 2')
pl.tight_layout()
+
#%% domain adaptation between images
+
def minmax(I):
return np.clip(I, 0, 1)
diff --git a/examples/plot_WDA.py b/examples/plot_WDA.py
index 8a44022..9eb8693 100644
--- a/examples/plot_WDA.py
+++ b/examples/plot_WDA.py
@@ -9,8 +9,7 @@ Wasserstein Discriminant Analysis
import numpy as np
import matplotlib.pylab as pl
-import ot
-from ot.datasets import get_1D_gauss as gauss
+
from ot.dr import wda, fda
diff --git a/examples/plot_optim_OTreg.py b/examples/plot_optim_OTreg.py
index 1c3a1c5..e38253c 100644
--- a/examples/plot_optim_OTreg.py
+++ b/examples/plot_optim_OTreg.py
@@ -36,6 +36,7 @@ ot.plot.plot1D_mat(a, b, G0, 'OT matrix G0')
#%% Example with Frobenius norm regularization
+
def f(G):
return 0.5 * np.sum(G**2)