spauq.core.metrics ================== .. py:module:: spauq.core.metrics Functions --------- .. autoapisummary:: spauq.core.metrics.signal_to_spatial_distortion_ratio spauq.core.metrics.signal_to_residual_distortion_ratio spauq.core.metrics.spauq_eval Module Contents --------------- .. py:function:: signal_to_spatial_distortion_ratio(reference, estimate, fs, *, return_framewise = False) :param reference: reference signal, shape=(n_channels, n_samples) :param estimate: reference signal, shape=(n_channels, n_samples) :param fs: sampling rate in Hz :param return_framewise: 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. :rtype: `float` or `np.ndarray` .. !! processed by numpydoc !! .. py:function:: signal_to_residual_distortion_ratio(reference, estimate, fs, *, return_framewise = False) :param reference: reference signal, shape=(n_channels, n_samples) :param estimate: reference signal, shape=(n_channels, n_samples) :param fs: sampling rate in Hz :param return_framewise: 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. :rtype: `float` or `np.ndarray` .. !! processed by numpydoc !! .. py:function:: spauq_eval(reference, estimate, fs, *, return_framewise = False, return_cost = False, return_shift = False, return_scale = False, verbose = True, **kwargs) :param reference: reference signal, shape=(n_channels, n_samples) :param estimate: reference signal, shape=(n_channels, n_samples) :param fs: sampling rate in Hz :param return_framewise: whether to return the framewise evaluation result :param return_cost: whether to return the estimation error (cost function) :param return_shift: whether to return the estimated shift parameters :param return_scale: whether to return the esitmated scale parameters :param verbose: whether to use verbose mode :param 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. :rtype: dict .. !! processed by numpydoc !!