alphacsc.learn_d_z_weighted#
- alphacsc.learn_d_z_weighted(X, n_atoms, n_times_atom, func_d=<function update_d_block>, reg=0.1, alpha=1.9, lmbd_max='fixed', n_iter_global=10, init_tau=False, n_iter_optim=10, n_iter_mcmc=10, n_burnin_mcmc=0, random_state=None, n_jobs=1, solver_z='l-bfgs', solver_d_kwargs={}, solver_z_kwargs={}, ds_init=None, verbose=0, callback=None)#
Univariate Convolutional Sparse Coding with an alpha-stable distribution
- Parameters
- Xarray, shape (n_trials, n_times)
The data on which to perform CSC.
- n_atomsint
The number of atoms to learn.
- n_times_atomint
The support of the atom.
- func_dcallable
The function to update the atoms.
- regfloat
The regularization parameter
- alphafloat in [0, 2[:
Parameter of the alpha-stable noise distribution.
- lmbd_max‘fixed’ | ‘scaled’ | ‘per_atom’ | ‘shared’
- If not fixed, adapt the regularization rate as a ratio of lambda_max:
‘scaled’: the regularization parameter is fixed as a ratio of its maximal value at init i.e. reg_used = reg * lmbd_max(uv_init)
‘shared’: the regularization parameter is set at each iteration as a ratio of its maximal value for the current dictionary estimate i.e. reg_used = reg * lmbd_max(uv_hat)
‘per_atom’: the regularization parameter is set per atom and at each iteration as a ratio of its maximal value for this atom i.e. reg_used[k] = reg * lmbd_max(uv_hat[k])
- n_iter_globalint
The number of iteration of the Expectation-Maximisation outer loop.
- init_tauboolean
If True, use a heuristic to initialize the weights tau.
- n_iter_optimint
The number of iteration of the Maximisation step (weighted CSC).
- n_iter_mcmcint
The number of iteration of the Expectation step (MCMC).
- n_burnin_mcmcint
The number of iteration unused by the MCMC algorithm.
- random_stateint | None
The random state.
- n_jobsint
The number of parallel jobs.
- solver_zstr
The solver to use for the z update. Options are ‘l-bfgs’ (default) | ‘ista’ | ‘fista’
- solver_d_kwargsdict
Additional keyword arguments to provide to update_d
- solver_z_kwargsdict
Additional keyword arguments to pass to update_z
- ds_initstr or array, shape (n_atoms, n_times_atom)
The initial atoms or an initialization scheme in {‘chunk’ | ‘random’}.
- verboseint
The verbosity level.
- callbackfunc
A callback function called at the end of each loop of the coordinate descent.
- Returns
- d_hatarray, shape (n_atoms, n_times_atom)
The estimated atoms.
- z_hatarray, shape (n_atoms, n_trials, n_times - n_times_atom + 1)
The sparse activation matrix.
- tauarray, shape (n_trials, n_times)
Weights estimated by the Expectation-Maximisation algorithm.