Skip to content

Commit fd76b98

Browse files
committed
titlke for notebooks
1 parent e800103 commit fd76b98

12 files changed

+59
-58
lines changed

examples/plot_OT_1D.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
##############################################################################
2222
# Generate data
23-
# #############
23+
# -------------
2424

2525

2626
#%% parameters
@@ -41,7 +41,7 @@
4141

4242
##############################################################################
4343
# Plot distributions and loss matrix
44-
###################################
44+
# ----------------------------------
4545

4646
#%% plot the distributions
4747

@@ -57,7 +57,8 @@
5757

5858
##############################################################################
5959
# Solve EMD
60-
##############################################################################
60+
# ---------
61+
6162

6263
#%% EMD
6364

@@ -68,7 +69,8 @@
6869

6970
##############################################################################
7071
# Solve Sinkhorn
71-
##############################################################################
72+
# --------------
73+
7274

7375
#%% Sinkhorn
7476

examples/plot_OT_2D_samples.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
##############################################################################
2121
# Generate data
22-
##############################################################################
22+
# -------------
2323

2424
#%% parameters and data generation
2525

@@ -42,7 +42,7 @@
4242

4343
##############################################################################
4444
# Plot data
45-
##############################################################################
45+
# ---------
4646

4747
#%% plot samples
4848

@@ -58,7 +58,7 @@
5858

5959
##############################################################################
6060
# Compute EMD
61-
##############################################################################
61+
# -----------
6262

6363
#%% EMD
6464

@@ -78,7 +78,7 @@
7878

7979
##############################################################################
8080
# Compute Sinkhorn
81-
##############################################################################
81+
# ----------------
8282

8383
#%% sinkhorn
8484

examples/plot_OT_L1_vs_L2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
##############################################################################
2424
# Dataset 1 : uniform sampling
25-
##############################################################################
25+
# ----------------------------
2626

2727
n = 20 # nb samples
2828
xs = np.zeros((n, 2))
@@ -73,7 +73,7 @@
7373

7474
##############################################################################
7575
# Dataset 1 : Plot OT Matrices
76-
##############################################################################
76+
# ----------------------------
7777

7878

7979
#%% EMD
@@ -114,7 +114,7 @@
114114

115115
##############################################################################
116116
# Dataset 2 : Partial circle
117-
##############################################################################
117+
# --------------------------
118118

119119
n = 50 # nb samples
120120
xtot = np.zeros((n + 1, 2))
@@ -168,7 +168,7 @@
168168

169169
##############################################################################
170170
# Dataset 2 : Plot OT Matrices
171-
##############################################################################
171+
# -----------------------------
172172

173173

174174
#%% EMD

examples/plot_WDA.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
##############################################################################
2626
# Generate data
27-
##############################################################################
27+
# -------------
2828

2929
#%% parameters
3030

@@ -51,7 +51,7 @@
5151

5252
##############################################################################
5353
# Plot data
54-
##############################################################################
54+
# ---------
5555

5656
#%% plot samples
5757
pl.figure(1, figsize=(6.4, 3.5))
@@ -69,7 +69,7 @@
6969

7070
##############################################################################
7171
# Compute Fisher Discriminant Analysis
72-
##############################################################################
72+
# ------------------------------------
7373

7474
#%% Compute FDA
7575
p = 2
@@ -78,7 +78,7 @@
7878

7979
##############################################################################
8080
# Compute Wasserstein Discriminant Analysis
81-
##############################################################################
81+
# -----------------------------------------
8282

8383
#%% Compute WDA
8484
p = 2
@@ -91,7 +91,7 @@
9191

9292
##############################################################################
9393
# Plot 2D projections
94-
##############################################################################
94+
# -------------------
9595

9696
#%% plot samples
9797

examples/plot_barycenter_1D.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
##############################################################################
2929
# Generate data
30-
##############################################################################
30+
# -------------
3131

3232
#%% parameters
3333

@@ -50,7 +50,7 @@
5050

5151
##############################################################################
5252
# Plot data
53-
##############################################################################
53+
# ---------
5454

5555
#%% plot the distributions
5656

@@ -62,7 +62,7 @@
6262

6363
##############################################################################
6464
# Barycenter computation
65-
##############################################################################
65+
# ----------------------
6666

6767
#%% barycenter computation
6868

@@ -92,7 +92,7 @@
9292

9393
##############################################################################
9494
# Barycentric interpolation
95-
##############################################################################
95+
# -------------------------
9696

9797
#%% barycenter interpolation
9898

examples/plot_compute_emd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
##############################################################################
2424
# Generate data
25-
##############################################################################
25+
# -------------
2626

2727
#%% parameters
2828

@@ -51,7 +51,7 @@
5151

5252
##############################################################################
5353
# Plot data
54-
##############################################################################
54+
# ---------
5555

5656
#%% plot the distributions
5757

@@ -67,7 +67,7 @@
6767

6868
##############################################################################
6969
# Compute EMD for the different losses
70-
##############################################################################
70+
# ------------------------------------
7171

7272
#%% Compute and plot distributions and loss matrix
7373

@@ -83,7 +83,7 @@
8383

8484
##############################################################################
8585
# Compute Sinkhorn for the different losses
86-
##############################################################################
86+
# -----------------------------------------
8787

8888
#%%
8989
reg = 1e-2

examples/plot_optim_OTreg.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
##############################################################################
3434
# Generate data
35-
##############################################################################
35+
# -------------
3636

3737
#%% parameters
3838

@@ -51,7 +51,7 @@
5151

5252
##############################################################################
5353
# Solve EMD
54-
##############################################################################
54+
# ---------
5555

5656
#%% EMD
5757

@@ -62,7 +62,7 @@
6262

6363
##############################################################################
6464
# Solve EMD with Frobenius norm regularization
65-
##############################################################################
65+
# --------------------------------------------
6666

6767
#%% Example with Frobenius norm regularization
6868

@@ -84,7 +84,7 @@ def df(G):
8484

8585
##############################################################################
8686
# Solve EMD with entropic regularization
87-
##############################################################################
87+
# --------------------------------------
8888

8989
#%% Example with entropic regularization
9090

@@ -106,7 +106,7 @@ def df(G):
106106

107107
##############################################################################
108108
# Solve EMD with Frobenius norm + entropic regularization
109-
##############################################################################
109+
# -------------------------------------------------------
110110

111111
#%% Example with Frobenius norm + entropic regularization with gcg
112112

examples/plot_otda_classes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020

2121
##############################################################################
22-
# generate data
23-
##############################################################################
22+
# Generate data
23+
# -------------
2424

2525
n_source_samples = 150
2626
n_target_samples = 150
@@ -31,7 +31,7 @@
3131

3232
##############################################################################
3333
# Instantiate the different transport algorithms and fit them
34-
##############################################################################
34+
# -----------------------------------------------------------
3535

3636
# EMD Transport
3737
ot_emd = ot.da.EMDTransport()
@@ -59,7 +59,7 @@
5959

6060
##############################################################################
6161
# Fig 1 : plots source and target samples
62-
##############################################################################
62+
# ---------------------------------------
6363

6464
pl.figure(1, figsize=(10, 5))
6565
pl.subplot(1, 2, 1)
@@ -80,7 +80,7 @@
8080

8181
##############################################################################
8282
# Fig 2 : plot optimal couplings and transported samples
83-
##############################################################################
83+
# ------------------------------------------------------
8484

8585
param_img = {'interpolation': 'nearest', 'cmap': 'spectral'}
8686

examples/plot_otda_color_images.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def minmax(I):
4242

4343
##############################################################################
4444
# Generate data
45-
##############################################################################
45+
# -------------
4646

4747
# Loading images
4848
I1 = ndimage.imread('../data/ocean_day.jpg').astype(np.float64) / 256
@@ -62,7 +62,7 @@ def minmax(I):
6262

6363
##############################################################################
6464
# Plot original image
65-
##############################################################################
65+
# -------------------
6666

6767
pl.figure(1, figsize=(6.4, 3))
6868

@@ -79,7 +79,7 @@ def minmax(I):
7979

8080
##############################################################################
8181
# Scatter plot of colors
82-
##############################################################################
82+
# ----------------------
8383

8484
pl.figure(2, figsize=(6.4, 3))
8585

@@ -101,7 +101,7 @@ def minmax(I):
101101

102102
##############################################################################
103103
# Instantiate the different transport algorithms and fit them
104-
##############################################################################
104+
# -----------------------------------------------------------
105105

106106
# EMDTransport
107107
ot_emd = ot.da.EMDTransport()
@@ -127,7 +127,7 @@ def minmax(I):
127127

128128
##############################################################################
129129
# Plot new images
130-
##############################################################################
130+
# ---------------
131131

132132
pl.figure(3, figsize=(8, 4))
133133

0 commit comments

Comments
 (0)