-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpymanopt.HOW
213 lines (196 loc) · 7.85 KB
/
pymanopt.HOW
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
Current best:
# Random flats
python3 pymanopt_test_karcher.py --optimize-from centroid --manifold pB
(better than optimize from random)
====================================================
ambient dimension: 120
number of given flats: 200
given flat orthogonal dimension: 30
affine subspace dimension: 5
use optimization to improve the centroid: True
test data: random
optimization cost function: simple
manifold: E^120 x Grassmann( 120, 5 )
====================================================
acc k: 76 num_inner: 18 f: +2.598658e+02 |grad|: 1.761838e+00 reached target residual-kappa (linear)
Terminated - max time reached after 76 iterations.
Final cost: 259.865813193
Distance to the flat from the origin: 5.43308033762
python3 pymanopt_test_karcher.py --manifold graff --optimize-from centroid
(better than optimize from random or optimize from saved pB centroid output)
====================================================
ambient dimension: 120
number of given flats: 200
given flat orthogonal dimension: 30
affine subspace dimension: 5
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: random
mean: karcher
manifold: graff
optimization cost function: simple
manifold: E^120 x Grassmann( 120, 5 )
====================================================
acc k: 106 num_inner: 97 f: +2.609108e+02 |grad|: 1.157142e-04 reached target residual-theta (superlinear)
Terminated - max time reached after 106 iterations.
Final cost: 260.910781554
Distance to the flat from the origin: 5.43663670807
pymanopt_test_karcher.py --manifold graff --optimize-from random
====================================================
ambient dimension: 120
number of given flats: 200
given flat orthogonal dimension: 30
affine subspace dimension: 5
use optimization to improve the centroid: random
load optimization initial guess from a file: None
test data: random
mean: karcher
manifold: graff
optimization cost function: simple
manifold: E^120 x Grassmann( 120, 5 )
====================================================
REJ TR- k: 71 num_inner: 318 f: +2.617582e+02 |grad|: 4.595286e-06 reached target residual-theta (superlinear)
Terminated - max time reached after 71 iterations.
Final cost: 261.758242733
Distance to the flat from the origin: 5.4307429023
---
# Random lines
pymanopt_test_karcher.py --manifold pB --optimize-from centroid --lines yes
====================================================
ambient dimension: 3
number of given flats: 200
given flat orthogonal dimension: 2
affine subspace dimension: 1
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: random
mean: karcher
manifold: pB
optimization cost function: simple
manifold: E^3 x Grassmann( 3, 1 )
====================================================
acc k: 9 num_inner: 3 f: +1.631681e+01 |grad|: 1.242780e-07 reached target residual-theta (superlinear)
Terminated - min grad norm reached after 9 iterations, 40.47 seconds.
Final cost: 16.3168098644
p2.T:
[ 0.56214087 0.46485883 0.51619574]
B2.T:
[[-0.99141507 -0.09930668 -0.08505498]]
Distance to the flat from the origin: 0.615994070361
pymanopt_test_karcher.py --manifold graff --optimize-from centroid --lines yes
====================================================
ambient dimension: 3
number of given flats: 200
given flat orthogonal dimension: 2
affine subspace dimension: 1
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: random
mean: karcher
manifold: graff
optimization cost function: simple
manifold: E^3 x Grassmann( 3, 1 )
====================================================
acc k: 13 num_inner: 3 f: +1.631674e+01 |grad|: 2.628522e-08 reached target residual-theta (superlinear)
Terminated - min grad norm reached after 13 iterations, 21.97 seconds.
Final cost: 16.3167372344
p2.T:
[-1.63739677 0.24456344 0.32752156]
B2.T:
[[ 2.42814899 0.24319249 0.20828396]]
Distance to the flat from the origin: 0.616004829414
---
# Random lines through the origin
pymanopt_test_karcher.py --manifold pB --optimize-from centroid --lines yes --test-data zero
====================================================
ambient dimension: 3
number of given flats: 200
given flat orthogonal dimension: 2
affine subspace dimension: 1
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: zero
mean: karcher
manifold: pB
optimization cost function: simple
manifold: E^3 x Grassmann( 3, 1 )
====================================================
acc k: 1 num_inner: 1 f: +2.844149e-53 |grad|: 1.009433e-25 reached target residual-theta (superlinear)
Terminated - min grad norm reached after 1 iterations, 3.20 seconds.
Final cost: 2.84414941974e-53
p2.T:
[ 3.13755302e-13 3.36043952e-13 3.10135503e-13]
B2.T:
[[-0.56575946 -0.60595006 -0.55923229]]
Distance to the flat from the origin: 5.36685212702e-28
pymanopt_test_karcher.py --manifold graff --optimize-from centroid --lines yes --test-data zero
====================================================
ambient dimension: 3
number of given flats: 200
given flat orthogonal dimension: 2
affine subspace dimension: 1
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: zero
mean: karcher
manifold: graff
optimization cost function: simple
manifold: E^3 x Grassmann( 3, 1 )
====================================================
acc k: 2 num_inner: 1 f: +1.290133e-33 |grad|: 2.830478e-09 reached target residual-kappa (linear)
Terminated - min grad norm reached after 2 iterations, 2.24 seconds.
Final cost: 1.29013324133e-33
p2.T:
[ -7.30781601e+23 -4.02190956e+23 7.55083062e+23]
B2.T:
[[ 2.88280202e+24 3.10295649e+24 2.76622544e+24]]
Distance to the flat from the origin: 1.0969616088e+24
(the origin is degenerate for graff; infinitely many solutions)
---
# Random lines along a line
pymanopt_test_karcher.py --manifold pB --optimize-from centroid --lines yes --test-data line
The solution should have slope: 0.57735026919
====================================================
ambient dimension: 3
number of given flats: 200
given flat orthogonal dimension: 2
affine subspace dimension: 1
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: line
mean: karcher
manifold: pB
optimization cost function: simple
manifold: E^3 x Grassmann( 3, 1 )
====================================================
acc k: 3 num_inner: 3 f: +1.588895e-23 |grad|: 7.289263e-09 reached target residual-theta (superlinear)
Terminated - min grad norm reached after 3 iterations, 11.00 seconds.
Final cost: 1.58889451666e-23
p2.T:
[ 99.49999992 99.49999992 99.49999992]
B2.T:
[[-0.57735027 -0.57735027 -0.57735027]]
Distance to the flat from the origin: 6.44521405232e-13
pymanopt_test_karcher.py --manifold graff --optimize-from centroid --lines yes --test-data line
The solution should have slope: 0.57735026919
====================================================
ambient dimension: 3
number of given flats: 200
given flat orthogonal dimension: 2
affine subspace dimension: 1
use optimization to improve the centroid: centroid
load optimization initial guess from a file: None
test data: line
mean: karcher
manifold: graff
optimization cost function: simple
manifold: E^3 x Grassmann( 3, 1 )
====================================================
acc k: 10 num_inner: 3 f: +2.195053e-17 |grad|: 3.877735e-09 reached target residual-theta (superlinear)
Terminated - min grad norm reached after 10 iterations, 10.67 seconds.
Final cost: 2.19505278765e-17
p2.T:
[-1.28665512 -1.28665512 -1.28665512]
B2.T:
[[ 1.5457248 1.5457248 1.5457248]]
Distance to the flat from the origin: 8.07158863223e-14