Skip to content

Commit 6adfbf6

Browse files
committed
Update indent in docstrings
1 parent d08f368 commit 6adfbf6

File tree

74 files changed

+147
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+147
-147
lines changed

PEPit/examples/adaptive_methods/polyak_steps_in_distance_to_optimum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def wc_polyak_steps_in_distance_to_optimum(L, mu, gamma, wrapper="cvxpy", solver
9797
(PEPit) Final upper bound (dual): 0.6694214876573649 and lower bound (primal example): 0.6694214876445734
9898
(PEPit) Duality gap: absolute: 1.2791434578218741e-11 and relative: 1.91081923934451e-11
9999
*** Example file: worst-case performance of Polyak steps ***
100-
PEPit guarantee: ||x_1 - x_*||^2 <= 0.669421 ||x_0 - x_*||^2
100+
PEPit guarantee: ||x_1 - x_*||^2 <= 0.669421 ||x_0 - x_*||^2
101101
Theoretical guarantee: ||x_1 - x_*||^2 <= 0.669421 ||x_0 - x_*||^2
102102
103103
"""
@@ -142,7 +142,7 @@ def wc_polyak_steps_in_distance_to_optimum(L, mu, gamma, wrapper="cvxpy", solver
142142
# Print conclusion if required
143143
if verbose != -1:
144144
print('*** Example file: worst-case performance of Polyak steps ***')
145-
print('\tPEPit guarantee:\t\t ||x_1 - x_*||^2 <= {:.6} ||x_0 - x_*||^2 '.format(pepit_tau))
145+
print('\tPEPit guarantee:\t ||x_1 - x_*||^2 <= {:.6} ||x_0 - x_*||^2 '.format(pepit_tau))
146146
print('\tTheoretical guarantee:\t ||x_1 - x_*||^2 <= {:.6} ||x_0 - x_*||^2'.format(theoretical_tau))
147147

148148
# Return the worst-case guarantee of the evaluated method (and the reference theoretical value)

PEPit/examples/adaptive_methods/polyak_steps_in_function_value.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def wc_polyak_steps_in_function_value(L, mu, gamma, wrapper="cvxpy", solver=None
9797
(PEPit) Final upper bound (dual): 0.6694214228930617 and lower bound (primal example): 0.6694214253294206
9898
(PEPit) Duality gap: absolute: -2.4363588924103396e-09 and relative: -3.6394994247628294e-09
9999
*** Example file: worst-case performance of Polyak steps ***
100-
PEPit guarantee: f(x_1) - f_* <= 0.669421 (f(x_0) - f_*)
100+
PEPit guarantee: f(x_1) - f_* <= 0.669421 (f(x_0) - f_*)
101101
Theoretical guarantee: f(x_1) - f_* <= 0.669421 (f(x_0) - f_*)
102102
103103
"""
@@ -142,7 +142,7 @@ def wc_polyak_steps_in_function_value(L, mu, gamma, wrapper="cvxpy", solver=None
142142
# Print conclusion if required
143143
if verbose != -1:
144144
print('*** Example file: worst-case performance of Polyak steps ***')
145-
print('\tPEPit guarantee:\t\t f(x_1) - f_* <= {:.6} (f(x_0) - f_*) '.format(pepit_tau))
145+
print('\tPEPit guarantee:\t f(x_1) - f_* <= {:.6} (f(x_0) - f_*) '.format(pepit_tau))
146146
print('\tTheoretical guarantee:\t f(x_1) - f_* <= {:.6} (f(x_0) - f_*)'.format(theoretical_tau))
147147

148148
# Return the worst-case guarantee of the evaluated method (and the reference theoretical value)

PEPit/examples/composite_convex_minimization/accelerated_proximal_gradient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def wc_accelerated_proximal_gradient(mu, L, n, wrapper="cvxpy", solver=None, ver
9595
(PEPit) Final upper bound (dual): 0.05263158967733932 and lower bound (primal example): 0.052631584231766296
9696
(PEPit) Duality gap: absolute: 5.445573027229589e-09 and relative: 1.0346587712901982e-07
9797
*** Example file: worst-case performance of the Accelerated Proximal Gradient Method in function values***
98-
PEPit guarantee: f(x_n)-f_* <= 0.0526316 ||x0 - xs||^2
98+
PEPit guarantee: f(x_n)-f_* <= 0.0526316 ||x0 - xs||^2
9999
Theoretical guarantee: f(x_n)-f_* <= 0.0526316 ||x0 - xs||^2
100100
101101
"""
@@ -144,7 +144,7 @@ def wc_accelerated_proximal_gradient(mu, L, n, wrapper="cvxpy", solver=None, ver
144144
if verbose != -1:
145145
print('*** Example file:'
146146
' worst-case performance of the Accelerated Proximal Gradient Method in function values***')
147-
print('\tPEPit guarantee:\t\t f(x_n)-f_* <= {:.6} ||x0 - xs||^2'.format(pepit_tau))
147+
print('\tPEPit guarantee:\t f(x_n)-f_* <= {:.6} ||x0 - xs||^2'.format(pepit_tau))
148148
print('\tTheoretical guarantee:\t f(x_n)-f_* <= {:.6} ||x0 - xs||^2'.format(theoretical_tau))
149149

150150
# Return the worst-case guarantee of the evaluated method ( and the reference theoretical value)

PEPit/examples/composite_convex_minimization/bregman_proximal_point.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def wc_bregman_proximal_point(gamma, n, wrapper="cvxpy", solver=None, verbose=1)
8282
(PEPit) Final upper bound (dual): 0.06666666638907502 and lower bound (primal example): 0.06666666577966435
8383
(PEPit) Duality gap: absolute: 6.094106747012162e-10 and relative: 9.1411602421417e-09
8484
*** Example file: worst-case performance of the Bregman Proximal Point in function values ***
85-
PEPit guarantee: F(x_n)-F_* <= 0.0666667 Dh(x_*; x_0)
85+
PEPit guarantee: F(x_n)-F_* <= 0.0666667 Dh(x_*; x_0)
8686
Theoretical guarantee: F(x_n)-F_* <= 0.0666667 Dh(x_*; x_0)
8787
8888
"""
@@ -124,7 +124,7 @@ def wc_bregman_proximal_point(gamma, n, wrapper="cvxpy", solver=None, verbose=1)
124124
# Print conclusion if required
125125
if verbose != -1:
126126
print('*** Example file: worst-case performance of the Bregman Proximal Point in function values ***')
127-
print('\tPEPit guarantee:\t\t F(x_n)-F_* <= {:.6} Dh(x_*; x_0)'.format(pepit_tau))
127+
print('\tPEPit guarantee:\t F(x_n)-F_* <= {:.6} Dh(x_*; x_0)'.format(pepit_tau))
128128
print('\tTheoretical guarantee:\t F(x_n)-F_* <= {:.6} Dh(x_*; x_0)'.format(theoretical_tau))
129129
# Return the worst-case guarantee of the evaluated method (and the upper theoretical value)
130130
return pepit_tau, theoretical_tau

PEPit/examples/composite_convex_minimization/douglas_rachford_splitting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def wc_douglas_rachford_splitting(L, alpha, theta, n, wrapper="cvxpy", solver=No
9898
(PEPit) Final upper bound (dual): 0.027791732322924277 and lower bound (primal example): 0.027791729871150122
9999
(PEPit) Duality gap: absolute: 2.4517741552265715e-09 and relative: 8.821955907723812e-08
100100
*** Example file: worst-case performance of the Douglas Rachford Splitting in function values ***
101-
PEPit guarantee: f(y_n)-f_* <= 0.0278 ||x0 - xs||^2
101+
PEPit guarantee: f(y_n)-f_* <= 0.0278 ||x0 - xs||^2
102102
Theoretical guarantee: f(y_n)-f_* <= 0.0278 ||x0 - xs||^2
103103
104104
"""
@@ -147,7 +147,7 @@ def wc_douglas_rachford_splitting(L, alpha, theta, n, wrapper="cvxpy", solver=No
147147
# Print conclusion if required
148148
if verbose != -1:
149149
print('*** Example file: worst-case performance of the Douglas Rachford Splitting in function values ***')
150-
print('\tPEPit guarantee:\t\t f(y_n)-f_* <= {:.3} ||x0 - xs||^2'.format(pepit_tau))
150+
print('\tPEPit guarantee:\t f(y_n)-f_* <= {:.3} ||x0 - xs||^2'.format(pepit_tau))
151151
if theta == 1 and alpha == 1 and L == 1 and n <= 10:
152152
print('\tTheoretical guarantee:\t f(y_n)-f_* <= {:.3} ||x0 - xs||^2'.format(theoretical_tau))
153153

PEPit/examples/composite_convex_minimization/douglas_rachford_splitting_contraction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def wc_douglas_rachford_splitting_contraction(mu, L, alpha, theta, n, wrapper="c
109109
(PEPit) Final upper bound (dual): 0.3501278016887412 and lower bound (primal example): 0.3501278029546837
110110
(PEPit) Duality gap: absolute: -1.2659425174810224e-09 and relative: -3.6156583590274623e-09
111111
*** Example file: worst-case performance of the Douglas-Rachford splitting in distance ***
112-
PEPit guarantee: ||w - wp||^2 <= 0.350128 ||w0 - w0p||^2
112+
PEPit guarantee: ||w - wp||^2 <= 0.350128 ||w0 - w0p||^2
113113
Theoretical guarantee: ||w - wp||^2 <= 0.350128 ||w0 - w0p||^2
114114
115115
"""
@@ -158,7 +158,7 @@ def wc_douglas_rachford_splitting_contraction(mu, L, alpha, theta, n, wrapper="c
158158
# Print conclusion if required
159159
if verbose != -1:
160160
print('*** Example file: worst-case performance of the Douglas-Rachford splitting in distance ***')
161-
print('\tPEPit guarantee:\t\t ||w - wp||^2 <= {:.6} ||w0 - w0p||^2'.format(pepit_tau))
161+
print('\tPEPit guarantee:\t ||w - wp||^2 <= {:.6} ||w0 - w0p||^2'.format(pepit_tau))
162162
if theta == 1:
163163
print('\tTheoretical guarantee:\t ||w - wp||^2 <= {:.6} ||w0 - w0p||^2'.format(theoretical_tau))
164164

PEPit/examples/composite_convex_minimization/frank_wolfe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def wc_frank_wolfe(L, D, n, wrapper="cvxpy", solver=None, verbose=1):
9393
(PEPit) Final upper bound (dual): 0.07828954284798424 and lower bound (primal example): 0.07828953904645822
9494
(PEPit) Duality gap: absolute: 3.801526024527213e-09 and relative: 4.855726666459652e-08
9595
*** Example file: worst-case performance of the Conditional Gradient (Frank-Wolfe) in function value ***
96-
PEPit guarantee: f(x_n)-f_* <= 0.0782895 ||x0 - xs||^2
96+
PEPit guarantee: f(x_n)-f_* <= 0.0782895 ||x0 - xs||^2
9797
Theoretical guarantee: f(x_n)-f_* <= 0.166667 ||x0 - xs||^2
9898
9999
"""
@@ -141,7 +141,7 @@ def wc_frank_wolfe(L, D, n, wrapper="cvxpy", solver=None, verbose=1):
141141
if verbose != -1:
142142
print('*** Example file:'
143143
' worst-case performance of the Conditional Gradient (Frank-Wolfe) in function value ***')
144-
print('\tPEPit guarantee:\t\t f(x_n)-f_* <= {:.6} ||x0 - xs||^2'.format(pepit_tau))
144+
print('\tPEPit guarantee:\t f(x_n)-f_* <= {:.6} ||x0 - xs||^2'.format(pepit_tau))
145145
print('\tTheoretical guarantee:\t f(x_n)-f_* <= {:.6} ||x0 - xs||^2'.format(theoretical_tau))
146146
# Return the worst-case guarantee of the evaluated method (and the upper theoretical value)
147147
return pepit_tau, theoretical_tau

PEPit/examples/composite_convex_minimization/improved_interior_algorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def wc_improved_interior_algorithm(L, mu, c, lam, n, wrapper="cvxpy", solver=Non
102102
(PEPit) Final upper bound (dual): 0.06807717277007506 and lower bound (primal example): 0.06807717876241919
103103
(PEPit) Duality gap: absolute: -5.992344120908655e-09 and relative: -8.802280338057462e-08
104104
*** Example file: worst-case performance of the Improved interior gradient algorithm in function values ***
105-
PEPit guarantee: F(x_n)-F_* <= 0.0680772 (c * Dh(xs;x0) + f1(x0) - F_*)
105+
PEPit guarantee: F(x_n)-F_* <= 0.0680772 (c * Dh(xs;x0) + f1(x0) - F_*)
106106
Theoretical guarantee: F(x_n)-F_* <= 0.111111 (c * Dh(xs;x0) + f1(x0) - F_*)
107107
108108
"""
@@ -163,7 +163,7 @@ def wc_improved_interior_algorithm(L, mu, c, lam, n, wrapper="cvxpy", solver=Non
163163
if verbose != -1:
164164
print('*** Example file:'
165165
' worst-case performance of the Improved interior gradient algorithm in function values ***')
166-
print('\tPEPit guarantee:\t\t F(x_n)-F_* <= {:.6} (c * Dh(xs;x0) + f1(x0) - F_*)'.format(pepit_tau))
166+
print('\tPEPit guarantee:\t F(x_n)-F_* <= {:.6} (c * Dh(xs;x0) + f1(x0) - F_*)'.format(pepit_tau))
167167
print('\tTheoretical guarantee:\t F(x_n)-F_* <= {:.6} (c * Dh(xs;x0) + f1(x0) - F_*)'.format(theoretical_tau))
168168

169169
# Return the worst-case guarantee of the evaluated method (and the upper theoretical value)

PEPit/examples/composite_convex_minimization/no_lips_in_bregman_divergence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def wc_no_lips_in_bregman_divergence(L, gamma, n, wrapper="cvxpy", solver=None,
101101
(PEPit) Final upper bound (dual): 0.022222222222206895 and lower bound (primal example): 0.022222222222201146
102102
(PEPit) Duality gap: absolute: 5.748873599387139e-15 and relative: 2.586993119726666e-13
103103
*** Example file: worst-case performance of the NoLips_2 in Bregman divergence ***
104-
PEPit guarantee: min_t Dh(x_(t-1); x_t) <= 0.0222222 Dh(x_*; x_0)
104+
PEPit guarantee: min_t Dh(x_(t-1); x_t) <= 0.0222222 Dh(x_*; x_0)
105105
Theoretical guarantee: min_t Dh(x_(t-1); x_t) <= 0.0222222 Dh(x_*; x_0)
106106
107107
"""
@@ -156,7 +156,7 @@ def wc_no_lips_in_bregman_divergence(L, gamma, n, wrapper="cvxpy", solver=None,
156156
# Print conclusion if required
157157
if verbose != -1:
158158
print('*** Example file: worst-case performance of the NoLips_2 in Bregman divergence ***')
159-
print('\tPEPit guarantee:\t\t min_t Dh(x_(t-1); x_t) <= {:.6} Dh(x_*; x_0)'.format(pepit_tau))
159+
print('\tPEPit guarantee:\t min_t Dh(x_(t-1); x_t) <= {:.6} Dh(x_*; x_0)'.format(pepit_tau))
160160
print('\tTheoretical guarantee:\t min_t Dh(x_(t-1); x_t) <= {:.6} Dh(x_*; x_0)'.format(theoretical_tau))
161161

162162
# Return the worst-case guarantee of the evaluated method (and the upper theoretical value)

PEPit/examples/composite_convex_minimization/no_lips_in_function_value.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def wc_no_lips_in_function_value(L, gamma, n, wrapper="cvxpy", solver=None, verb
103103
(PEPit) Final upper bound (dual): 0.666666666662425 and lower bound (primal example): 0.6666666666481619
104104
(PEPit) Duality gap: absolute: 1.4263146219661849e-11 and relative: 2.139471933008663e-11
105105
*** Example file: worst-case performance of the NoLips in function values ***
106-
PEPit guarantee: F(x_n) - F_* <= 0.666667 Dh(x_*; x_0)
106+
PEPit guarantee: F(x_n) - F_* <= 0.666667 Dh(x_*; x_0)
107107
Theoretical guarantee: F(x_n) - F_* <= 0.666667 Dh(x_*; x_0)
108108
109109
"""
@@ -155,7 +155,7 @@ def wc_no_lips_in_function_value(L, gamma, n, wrapper="cvxpy", solver=None, verb
155155
# Print conclusion if required
156156
if verbose != -1:
157157
print('*** Example file: worst-case performance of the NoLips in function values ***')
158-
print('\tPEPit guarantee:\t\t F(x_n) - F_* <= {:.6} Dh(x_*; x_0)'.format(pepit_tau))
158+
print('\tPEPit guarantee:\t F(x_n) - F_* <= {:.6} Dh(x_*; x_0)'.format(pepit_tau))
159159
print('\tTheoretical guarantee:\t F(x_n) - F_* <= {:.6} Dh(x_*; x_0)'.format(theoretical_tau))
160160
# Return the worst-case guarantee of the evaluated method (and the upper theoretical value)
161161
return pepit_tau, theoretical_tau

0 commit comments

Comments
 (0)