ssspy.bss.admmbss¶
Algorithms¶
- class ssspy.bss.admmbss.ADMMBSSBase(penalty_fn=None, prox_penalty=None, callbacks=None, scale_restoration=True, record_loss=None, reference_id=0)¶
Base class of blind source separation via alternative direction method of multiplier.
- Parameters:
penalty_fn (callable) – Penalty function that determines source model.
prox_penalty (callable) – Proximal operator of penalty function. Default:
None.callbacks (callable or list[callable], optional) – Callback functions. Each function is called before separation and at each iteration. Default:
None.scale_restoration (bool or str) – Technique to restore scale ambiguity. If
scale_restoration=True, the projection back technique is applied to estimated spectrograms. You can also specifyprojection_backexplicitly. Default:True.record_loss (bool) – Record the loss at each iteration of the update algorithm if
record_loss=True. Default:True.reference_id (int) – Reference channel for projection back. Default:
0.
- class ssspy.bss.admmbss.ADMMBSS(rho=1, alpha=None, relaxation=1, penalty_fn=None, prox_penalty=None, callbacks=None, scale_restoration=True, record_loss=True, reference_id=0)¶
Base class of blind source separation via alternative direction method of multiplier.
- Parameters:
rho (float) – Penalty parameter. Default:
1.alpha (float) – Relaxation parameter (deprecated). Set
relaxationinstead.relaxation (float) – Relaxation parameter. Default:
1.penalty_fn (callable) – Penalty function that determines source model.
prox_penalty (callable) – Proximal operator of penalty function. Default:
None.callbacks (callable or list[callable], optional) – Callback functions. Each function is called before separation and at each iteration. Default:
None.scale_restoration (bool or str) – Technique to restore scale ambiguity. If
scale_restoration=True, the projection back technique is applied to estimated spectrograms. You can also specifyprojection_backexplicitly. Default:True.record_loss (bool) – Record the loss at each iteration of the update algorithm if
record_loss=True. Default:True.reference_id (int) – Reference channel for projection back. Default:
0.
- __call__(input, n_iter=100, initial_call=True, **kwargs)¶
Separate a frequency-domain multichannel signal.
- Parameters:
input (numpy.ndarray) – Mixture signal in frequency-domain. The shape is (n_channels, n_bins, n_frames).
n_iter (int) – Number of iterations of demixing filter updates. Default:
100.initial_call (bool) – If
True, perform callbacks (and computation of loss if necessary) before iterations.
- Return type:
ndarray- Returns:
numpy.ndarray of the separated signal in frequency-domain. The shape is (n_channels, n_bins, n_frames).
- update_once()¶
Update demixing filters, auxiliary parameters, and dual parameters once.
- Return type:
None