-
Notifications
You must be signed in to change notification settings - Fork 16
/
TODO
624 lines (199 loc) · 10.3 KB
/
TODO
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# This file is automatically generated by generate_todo.py.
# Files that start with an underscore ("_") have been excluded.
./parsimony/config.py:
---------------------
29: # TODO: Python 3 destroys the ini file sometimes on delete. Make the config
30: # read the file on every call? Slower, but much safer; especially when
31: # running multiple instances of pylearn-parsimony.
68: # TODO: Anything we can do to resolve this?
./parsimony/estimators.py:
-------------------------
93: # TODO: Make all estimators implement this method!
94: # @abc.abstractmethod
114: # TODO: Make all estimators implement this method!
115: # @abc.abstractmethod
126: # TODO: Is this a good name?
140: # TODO: Why is this here? Move to InformationAlgorithm?
284: # TODO: Should we use a seed here so that we get deterministic results?
396: # TODO: Should we use a seed somewhere so that we get deterministic
397: # results?
512: # TODO: Should we use a seed here so that we get deterministic results?
632: # TODO: Should we use a seed here so that we get deterministic results?
819: # TODO: Should we use a seed here so that we get deterministic
820: # results?
848: # TODO: Should we use a seed here so that we get deterministic
849: # results?
999: # TODO: Should we use a seed somewhere so that we get deterministic
1000: # results?
1159: # TODO: Should we use a seed here so that we get deterministic results?
1490: # TODO: Should we use a seed here so that we get deterministic results?
1679: # TODO: Should we use a seed here so that we get deterministic results?
1799: # TODO: Should we use a seed here so that we get deterministic results?
1924: # TODO: Should we use a seed here so that we get deterministic results?
2098: # TODO: Should we use a seed here so that we get deterministic results?
2179: # TODO: Should we use a seed here so that we get deterministic results?
2330: # TODO: Should we use a seed here so that we get deterministic results?
2508: # TODO: Should we use a seed here so that we get deterministic results?
2913: # TODO: Add determinism through a random_state?
3046: # TODO: Should we use a seed here so that we get deterministic
3047: # results?
3048: # if w is None or k > 0:
3264: # TODO: Should we use a seed here so that we get deterministic
3265: # results?
3266: # if w is None or k > 0:
./parsimony/algorithms\algorithms.py:
------------------------------------
208: # TODO: What if multiple maxs?
218: # TODO: Necessary to loop over those from the loop above?
219: # Loop over all possible i1 in random order:
./parsimony/algorithms\bases.py:
-------------------------------
65: # TODO: Keep this list up to date!
72: # TODO: Replace the one in BaseAlgorithm.
./parsimony/algorithms\cluster.py:
---------------------------------
110: # TODO: Warn if repeat > 1?
152: mu = global_mean # TODO: Correct solution?
./parsimony/algorithms\nipals.py:
--------------------------------
50: # TODO: Add information about the runs.
362: # TODO: Use estimators for this!
./parsimony/algorithms\primaldual.py:
------------------------------------
70: Info.fvalue, # TODO: Removed in future versions!
128: if (self.info_requested(Info.fvalue) # TODO: Remove fvalue!
160: if (self.info_requested(Info.fvalue) # TODO: Remove fvalue!
192: if (self.info_requested(Info.fvalue) # TODO: Remove fvalue!
194: self.info_set(Info.fvalue, f) # TODO: Remove fvalue!
./parsimony/algorithms\proximal.py:
----------------------------------
367: # TODO: Warn if G_new < -consts.TOLERANCE.
394: else: # TODO: Fix this!
600: # TODO: Warn if gap_mu < -consts.TOLERANCE.
1017: # TODO: Investigate what is a good default value here!
1075: y_new = x_new # TODO: Allow a linear operator here.
1152: # TODO: Investigate what good default value are here!
1204: # TODO: Investigate what good default values are here!
1257: # TODO: Investigate what is a good default value here!
1295: # TODO: Does the weights really matter when the function is the
1296: # indicator function?
1329: # TODO: Investigate what is a good default value here!
./parsimony/algorithms\utils.py:
-------------------------------
42: # TODO: This class should be replaced with Enum.
179: # TODO: Remove or replace! Use functionality from scipy.optimize instead!
391: # TODO: We already have f_mid, so we can return a better approximation
392: # here!
482: # TODO: Handle the other cases!
494: # TODO: We seek a root, i.e. where f(x) = 0. The stopping criterion
495: # should (could?) thus be abs(f(x)) <= eps!
514: if abs(x - x_) <= self.eps: # TODO: Stopping criterion. See above!
658: # TODO: Be clever if we cannot fit self._K in memory!
./parsimony/functions\combinedfunctions.py:
------------------------------------------
43: # TODO: Add penalty_start and mean to all of these!
1109: # TODO: This is not good. Solve this better!
1604: # TODO: It appears we sometimes get log(x) for x <= 0 here. np.clip?
1751: # TODO: This is not a good solution. Can we solve this in a better way?
1803: # TODO: Use max_iter here!!
1853: # TODO: Kernelise this function! See how I did in
1854: # LinearRegressionL1L2TV._beta_hat.
1905: # TODO: Add this function or refactor API!
2161: # TODO: This is not a nice solution. Can we solve it better?
./parsimony/functions\losses.py:
-------------------------------
198: # TODO: Inherit from LinearRegression and add an L2 constraint instead!
378: # TODO: Make the weights sparse.
379: # weights = np.eye(self.X.shape[0])
381: # TODO: Allow the weight vector to be a list.
489: # TODO: Use RankOneSVD for speedup!
491: self._L = np.max(s) ** 2.0 # TODO: CHECK
655: PWX = 0.5 * np.sqrt(self.weights) * self.X # TODO: CHECK WITH FOUAD
656: # PW = 0.5 * np.eye(self.X.shape[0]) ## miss np.sqrt(self.W)
657: # PW = 0.5 * np.sqrt(self.W)
658: # PWX = np.dot(PW, self.X)
659: # TODO: Use RankOneSVD for speedup!
661: self._L = np.max(s) ** 2.0 # TODO: CHECK
666: self._L += self.k # TODO: CHECK
684: # TODO: Handle mean here?
1123: # TODO: This needs some serious speed-ups!
1189: # TODO: This needs some serious speed-ups!
./parsimony/functions\penalties.py:
----------------------------------
225: # TODO: BUG: i may be equal to p => IndexError: list index out of range
228: # TODO: This should not be able to happen! Do we know it doesn't?
232: # TODO: This should not be able to happen! Do we know it doesn't?
600: # TODO: Check if this is correct!
1223: # TODO: Redefine grad and f, without inheritance from QuadraticConstraint
1224: # to speed up computing of f matrix-vector multiplication only needs to be
1225: # performed once,
1249: # TODO: This only work if the elements of self._A are scipy.sparse. We
1250: # should allow dense matrices as well.
1256: # TODO: Add max_iter here!
2255: # TODO: Implement this!
2264: # TODO: Implement this!
./parsimony/functions\properties.py:
-----------------------------------
153: # TODO: Should all constraints have the projection operator?
253: # TODO: Remove.
492: # TODO: Should L by default take a weight vector as argument?
847: # TODO: This only work if the elements of self._A are scipy.sparse. We
848: # should allow dense matrices as well.
854: # TODO: Add max_iter here!
./parsimony/functions\taylor.py:
-------------------------------
150: # TODO: Not very good OO here ...
151: # TODO: Beware of API changes here!
179: # TODO: Not very good OO here ...
180: # TODO: Beware of API changes here!
./parsimony/functions\multiblock\losses.py:
------------------------------------------
1290: # TODO: Check instead if it is a numpy array.
./parsimony/functions\nesterov\grouptv.py:
-----------------------------------------
157: # TODO: This only work if the elements of self._A are scipy.sparse. We
158: # should allow dense matrices as well.
164: # TODO: Add max_iter here!
./parsimony/functions\nesterov\l1tv.py:
--------------------------------------
67: # WARNING: Number of non-zero rows may differ from p.
150: # TODO: Instead of p, this should really be the number of non-zero
151: # rows of A.
162: # TODO: Add max_iter here!!
269: # TODO: Do we need to take the number of variables here?
270: # Why not use np.prod(shape) + penalty_start instead and save a parameter?
300: # TODO: Do we need to take the number of variables here?
301: # Why not use np.prod(shape) + penalty_start instead and save a parameter?
./parsimony/functions\nesterov\tv.py:
------------------------------------
169: # TODO: This only work if the elements of self._A are scipy.sparse. We
170: # should allow dense matrices as well.
173: # TODO: Instead of p, this should really be the number of non-zero
174: # rows of A.
184: # TODO: Add max_iter here!
./parsimony/utils\consts.py:
---------------------------
20: # TODO: MAX_ITER is heavily algorithm-dependent, so we have to think about if
21: # we should include a package-wide maximum at all.
./parsimony/utils\linalgs.py:
----------------------------
515: # TODO: Put in compiled code for speed.
538: # TODO: Do this instead: In this case x0 is found trivially and we
539: # recurse to a problem of order n-1.
548: # TODO: Use algorithm for banded matrices instead!
./parsimony/utils\plots.py:
--------------------------
98: # TODO: Add the other cases.
./parsimony/utils\stats.py:
--------------------------
132: value = 1.0 # TODO: Is this really correct?
./parsimony/utils\utils.py:
--------------------------
31: # TODO: This depends on the OS. We should try to be clever here ...
34: time = time_cpu # TODO: Make it so that this can be changed by settings.
./parsimony/utils\weights.py:
----------------------------
63: np.random.seed(seed) # TODO: Adapt to use RandomState instead!
64: # random_state = np.random.RandomState(seed)
260: # TODO: Normalise columns when a matrix?
740: # TODO: Is this really correct??