In this module, we separate multichannel signals
using independent low-rank matrix analysis (ILRMA).
We denote the number of sources and microphones as \(N\) and \(M\), respectively.
We also denote short-time Fourier transforms of source, observed, and separated signals
as \(\boldsymbol{s}_{ij}\), \(\boldsymbol{x}_{ij}\), and \(\boldsymbol{y}_{ij}\),
respectively.
where \(i=1,\ldots,I\) and \(j=1,\ldots,J\) are indices of frequency bins and time frames, respectively.
When a mixing system is time-invariant, \(\boldsymbol{x}_{ij}\) is represented as follows:
where \(\boldsymbol{A}_{i}=(\boldsymbol{a}_{i1},\ldots,\boldsymbol{a}_{in},\ldots,\boldsymbol{a}_{iN})\in\mathbb{C}^{M\times N}\) is
a mixing matrix.
If \(M=N\) and \(\boldsymbol{A}_{i}\) is non-singular, a demixing system is represented as
where \(\boldsymbol{W}_{i}=(\boldsymbol{w}_{i1},\ldots,\boldsymbol{w}_{in},\ldots,\boldsymbol{w}_{iN})^{\mathsf{H}}\in\mathbb{C}^{N\times M}\) is
a demixing matrix.
The negative log-likelihood of observed signals (divided by \(J\)) is computed as follows:
Base class of independent low-rank matrix analysis (ILRMA).
Parameters:
n_basis (int) – Number of NMF bases.
partitioning (bool) – Whether to use partioning function. Default: False.
flooring_fn (callable, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
Default: functools.partial(max_flooring,eps=1e-10).
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 specify projection_back explicitly.
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.
rng (numpy.random.Generator, optioinal) – Random number generator. This is mainly used to randomly initialize NMF.
If None is given, np.random.default_rng() is used.
Default: None.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
rng (numpy.random.Generator, optional) – Random number generator. If None is given,
np.random.default_rng() is used.
Default: None.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Normalize demixing filters and NMF parameters by power.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
spatial_algorithm (str) – Algorithm for demixing filter updates.
Choose IP, IP1, IP2, ISS, ISS1, or ISS2.
Default: IP.
source_algorithm (str) – Algorithm for source model updates.
Choose MM or ME. Default: MM.
domain (float) – Domain parameter. Default: 2.
partitioning (bool) – Whether to use partioning function. Default: False.
flooring_fn (callable, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
Default: functools.partial(max_flooring,eps=1e-10).
pair_selector (callable, optional) – Selector to choose updaing pair in IP2 and ISS2.
If None is given, sequential_pair_selector is used.
Default: None.
callbacks (callable or list[callable], optional) – Callback functions. Each function is called before separation and at each iteration.
Default: None.
normalization (bool or str, optional) – Normalization of demixing filters and NMF parameters.
Choose power or projection_back.
Default: power.
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 specify projection_back
or minimal_distortion_principle. 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 and minimal distortion principle. Default: 0.
rng (numpy.random.Generator, optioinal) – Random number generator. This is mainly used to randomly initialize NMF.
If None is given, np.random.default_rng() is used.
Default: None.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables.
If source_algorithm is MM, update_source_model_mm is called.
If source_algorithm is ME, update_source_model_me is called.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables by ME algorithm.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables by MM algorithm.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
If spatial_algorithm is IP or IP1, update_spatial_model_ip1 is called.
If spatial_algorithm is ISS or ISS1, update_spatial_model_iss1 is called.
If spatial_algorithm is IP2, update_spatial_model_ip2 is called.
If spatial_algorithm is ISS2, update_spatial_model_iss2 is called.
If spatial_algorithm is IPA, update_spatial_model_ipa is called.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update demixing filters once using iterative projection.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
Demixing filters are updated sequentially for \(n=1,\ldots,N\) as follows:
Update demixing filters once using pairwise iterative projection following [2].
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
For \(n_{1}\) and \(n_{2}\) (\(n_{1}\neq n_{2}\)),
compute weighted covariance matrix as follows:
Update estimated spectrograms once using iterative projection with adjustment [3].
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Then, by defining, \(\tilde{\boldsymbol{U}}_{in'}\),
\(\boldsymbol{A}_{in}\in\mathbb{R}^{(N-1)\times(N-1)}\),
\(\boldsymbol{b}_{in}\in\mathbb{C}^{N-1}\),
\(\boldsymbol{C}_{in}\in\mathbb{C}^{(N-1)\times(N-1)}\),
\(\boldsymbol{d}_{in}\in\mathbb{C}^{N-1}\),
and \(z_{in}\in\mathbb{R}_{\geq 0}\) as follows:
Update estimated spectrograms once using iterative source steering.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update estimated spectrograms once using pairwise iterative source steering.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
Compute \(\boldsymbol{G}_{in}^{(n_{1},n_{2})}\)
and \(\boldsymbol{f}_{in}^{(n_{1},n_{2})}\) for \(n_{1}\neq n_{2}\):
dof (float) – Degree of freedom parameter in student’s-t distribution.
spatial_algorithm (str) – Algorithm for demixing filter updates.
Choose IP, IP1, IP2, ISS, ISS1, or ISS2.
Default: IP.
source_algorithm (str) – Algorithm for source model updates.
Choose MM or ME. Default: MM.
domain (float) – Domain parameter. Default: 2.
partitioning (bool) – Whether to use partioning function. Default: False.
flooring_fn (callable, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
Default: functools.partial(max_flooring,eps=1e-10).
pair_selector (callable, optional) – Selector to choose updaing pair in IP2 and ISS2.
If None is given, sequential_pair_selector is used.
Default: None.
callbacks (callable or list[callable], optional) – Callback functions. Each function is called before separation and at each iteration.
Default: None.
normalization (bool or str, optional) – Normalization of demixing filters and NMF parameters.
Choose power or projection_back.
Default: power.
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 specify projection_back
or minimal_distortion_principle. 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 and minimal distortion principle. Default: 0.
rng (numpy.random.Generator, optioinal) – Random number generator. This is mainly used to randomly initialize NMF.
If None is given, np.random.default_rng() is used.
Default: None.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables.
If source_algorithm is MM, update_source_model_mm is called.
If source_algorithm is ME, update_source_model_me is called.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables by ME algorithm.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables by MM algorithm.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
If spatial_algorithm is IP or IP1, update_spatial_model_ip1 is called.
If spatial_algorithm is ISS or ISS1, update_spatial_model_iss1 is called.
If spatial_algorithm is IP2, update_spatial_model_ip2 is called.
If spatial_algorithm is ISS2, update_spatial_model_iss2 is called.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update demixing filters once using iterative projection.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
Demixing filters are updated sequentially for \(n=1,\ldots,N\) as follows:
Update demixing filters once using pairwise iterative projection.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
For \(n_{1}\) and \(n_{2}\) (\(n_{1}\neq n_{2}\)),
compute weighted covariance matrix as follows:
Update estimated spectrograms once using iterative source steering.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update estimated spectrograms once using pairwise iterative source steering.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
Compute \(\boldsymbol{G}_{in}^{(n_{1},n_{2})}\)
and \(\boldsymbol{f}_{in}^{(n_{1},n_{2})}\) for \(n_{1}\neq n_{2}\):
\(\beta\) is a shape parameter of a generalized Gaussian distribution.
Parameters:
n_basis (int) – Number of NMF bases.
beta (float) – Shape parameter in generalized Gaussian distribution.
spatial_algorithm (str) – Algorithm for demixing filter updates.
Choose IP, IP1, IP2, ISS, ISS1, or ISS2.
Default: IP.
source_algorithm (str) – Algorithm for source model updates.
Only MM is supported: Default: MM.
domain (float) – Domain parameter. Default: 2.
partitioning (bool) – Whether to use partioning function. Default: False.
flooring_fn (callable, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
Default: functools.partial(max_flooring,eps=1e-10).
pair_selector (callable, optional) – Selector to choose updaing pair in IP2 and ISS2.
If None is given, sequential_pair_selector is used.
Default: None.
callbacks (callable or list[callable], optional) – Callback functions. Each function is called before separation and at each iteration.
Default: None.
normalization (bool or str, optional) – Normalization of demixing filters and NMF parameters.
Choose power or projection_back.
Default: power.
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 specify projection_back
or minimal_distortion_principle. 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 and minimal distortion principle. Default: 0.
rng (numpy.random.Generator, optioinal) – Random number generator. This is mainly used to randomly initialize NMF.
If None is given, np.random.default_rng() is used.
Default: None.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update NMF bases, activations, and latent variables by MM algorithm.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
If spatial_algorithm is IP or IP1, update_spatial_model_ip1 is called.
If spatial_algorithm is ISS or ISS1, update_spatial_model_iss1 is called.
If spatial_algorithm is IP2, update_spatial_model_ip2 is called.
If spatial_algorithm is ISS2, update_spatial_model_iss2 is called.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update demixing filters once using iterative projection.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
Demixing filters are updated sequentially for \(n=1,\ldots,N\) as follows:
Update demixing filters once using pairwise iterative projection.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
For \(n_{1}\) and \(n_{2}\) (\(n_{1}\neq n_{2}\)),
compute weighted covariance matrix as follows:
Update estimated spectrograms once using iterative source steering.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Update estimated spectrograms once using pairwise iterative source steering.
Parameters:
flooring_fn (callable or str, optional) – A flooring function for numerical stability.
This function is expected to return the same shape tensor as the input.
If you explicitly set flooring_fn=None,
the identity function (lambdax:x) is used.
If self is given as str, self.flooring_fn is used.
Default: self.
Return type:
None
Compute \(\boldsymbol{G}_{in}^{(n_{1},n_{2})}\)
and \(\boldsymbol{f}_{in}^{(n_{1},n_{2})}\) for \(n_{1}\neq n_{2}\):