diff options
Diffstat (limited to 'src/convex_optimization.py')
| -rw-r--r-- | src/convex_optimization.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/convex_optimization.py b/src/convex_optimization.py index e355bc6..fce89b8 100644 --- a/src/convex_optimization.py +++ b/src/convex_optimization.py @@ -80,7 +80,7 @@ def type_lasso(lbda, n_cascades): return f_x, f_xz -@timeout.timeout(10) +@timeout.timeout(70) def diff_and_opt(M_val, w_val, f_x, f_xz): if M_val.dtype == bool: @@ -90,7 +90,7 @@ def diff_and_opt(M_val, w_val, f_x, f_xz): def F(x=None, z=None): if x is None: - return 0, cvxopt.matrix(-.001, (n,1)) + return 0, cvxopt.matrix(-.7, (n,1)) elif z is None: y, y_diff = f_x(x, M_val, w_val) return cvxopt.matrix(float(y), (1, 1)),\ @@ -116,7 +116,7 @@ def diff_and_opt(M_val, w_val, f_x, f_xz): " given to the solver") except ValueError: print("Domain Error, skipping to next node") - theta = np.zeros(len(w_val)) + theta = np.zeros(M_val.shape[1]) if cvxopt.solvers.options['show_progress']: print(1 - np.exp(theta)) |
