ssspy.bss.base#
In this module, we provide base class of blind source separation methods.
Algorithms#
- class ssspy.bss.base.IterativeMethodBase(callbacks=None, record_loss=True)#
Base class of iterative method.
This class provides prototype of iterative updates.
- Parameters:
callbacks (callable or list[callable], optional) – Callback functions. Each function is called before separation and at each iteration. Default:
None
.record_loss (bool) – Record the loss at each iteration of the update algorithm if
record_loss=True
. Default:True
.
- __call__(*args, n_iter=100, initial_call=True, **kwargs)#
Iteratively call
update_once
.- Parameters:
n_iter (int) – The 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
- compute_loss()#
Compute loss.
- Return type:
float
- Returns:
Computed loss. The type is expected
float
.
- update_once()#
Update parameters once.
- Return type:
None