spauq.core.metrics
Functions
|
|
|
|
|
|
Module Contents
- signal_to_spatial_distortion_ratio(reference, estimate, fs, *, return_framewise=False)
- Parameters:
reference (numpy.ndarray) – reference signal, shape=(n_channels, n_samples)
estimate (numpy.ndarray) – reference signal, shape=(n_channels, n_samples)
fs (int) – sampling rate in Hz
return_framewise (bool) – whether to return the framewise evaluation result
- Returns:
Median signal to spatial distortion ratio over frames in dB. An array of shape (n_frames,) if return_framewise is true.
- Return type:
float or np.ndarray
- signal_to_residual_distortion_ratio(reference, estimate, fs, *, return_framewise=False)
- Parameters:
reference (numpy.ndarray) – reference signal, shape=(n_channels, n_samples)
estimate (numpy.ndarray) – reference signal, shape=(n_channels, n_samples)
fs (int) – sampling rate in Hz
return_framewise (bool) – whether to return the framewise evaluation result
- Returns:
Median signal to residual distortion ratio over frames in dB. An array of shape (n_frames,) if return_framewise is true.
- Return type:
float or np.ndarray
- spauq_eval(reference, estimate, fs, *, return_framewise=False, return_cost=False, return_shift=False, return_scale=False, verbose=True, **kwargs)
- Parameters:
reference (numpy.ndarray) – reference signal, shape=(n_channels, n_samples)
estimate (numpy.ndarray) – reference signal, shape=(n_channels, n_samples)
fs (int) – sampling rate in Hz
return_framewise (bool) – whether to return the framewise evaluation result
return_cost (bool) – whether to return the estimation error (cost function)
return_shift (bool) – whether to return the estimated shift parameters
return_scale (bool) – whether to return the esitmated scale parameters
verbose (bool) – whether to use verbose mode
kwargs – additional keyword arguments to be passed to the internal function.
- Returns:
A dictionary with the following keys:
- SSR (float or np.ndarray)
Median signal to spatial distortion ratio in dB. An array of shape (n_frames,) if return_framewise is true.
- SRR (float or np.ndarray)
Median signal to residual distortion ratio in dB. An array of shape (n_frames,) if return_framewise is true.
- cost (float or np.ndarray)
Median cost function of the estimates over frames. An array of shape (n_frames,) if return_framewise is true.
- shift (np.ndarray)
An array of shape (n_channels, n_channels,) of the elementwise median of the shift matrices over frames. An array of shape (n_channels, n_channels, n_frames,) if return_framewise is true.
- scale (np.ndarray)
An array of shape (n_channels, n_channels,) of the elementwise median of the scale matrices over frames. An array of shape (n_channels, n_channels, n_frames,) if return_framewise is true.
- Return type: