iterreg.sparse.solvers.dual_primal¶
- iterreg.sparse.solvers.dual_primal(X, y, max_iter=1000, f_store=10, prox=CPUDispatcher(<function shrink>), ret_all=True, callback=None, memory=10, step_ratio=1, rho=0.99, verbose=False)¶
Chambolle-Pock algorithm applied to the dual: interpolation on the primal update. Parameters ———- X : np.array, shape (n_samples, n_features)
Design matrix.
- ynp.array, shape (n_samples,)
Observation vector.
- max_iterint, optional (default=1000)
Maximum number of Chambolle-Pock iterations.
- f_storeint, optional (default=10)
Primal iterates w are stored every f_store iterations.
- proxcallable, optional (default=shrink)
Proximal operator of the minimized regularizer. By default, a shrink is used, corresponding to the convex L1 regularizer. It is given (w, tau) as input (the primal iterate and the primal stepsize).
- ret_allbool, optional (default=True)
If True, return all stored primal iterates.
- callbackcallable or None, optional (default=None)
Callable called on primal iterate w every f_store iterations.
- memoryint, optional (default=10)
If callback is not None and its value did not decrease for the last memory stored iterates, the algorithm is early stopped.
- step_ratiofloat, optional (default=1)
Ratio betwen primal and dual stepsizes (tau/sigma). If step_ratio=1, both stepsizes are equal.
- rhofloat, optional (default=0.99)
The product of the step sizes is equal to rho / norm(X, ord=2)**2
- verbosebool, optional (default=False)
Verbosity of the algorithm.
- wnp.array, shape (n_features,)
Last or best primal iterate.
- thetanp.array, shape (n_samples,)
Last or best dual iterate.
- critsnp.array, shape (max_iter // f_store,)
Value of callback along iterations.
- all_wnp.array, shape (max_iter // f_store, n_features)
Primal iterates every f_store iterations. Returned only if ret_all is True.