denspp.offline.metric.snr
#
Module Contents#
Functions#
Calculating the signal-to-noise ratio [dB] of the input signal compared to mean waveform |
|
Calculating the Signal-to-Noise (SNR) ratio of the input data Args: data: Tensor with raw data / frame mean: Tensor with class-specific mean data / frame Return: Tensor with SNR value |
|
Calculation of metric Signal-to-Noise ratio (SNR) of defined input and reference waveform Args: input_waveform: Tensor array with input waveform mean_waveform: Tensor array with real mean waveform from dataset Return: Tensor with differential Signal-to-Noise ratio (SNR) of applied waveforms |
|
Calculation of metric different Signal-to-Noise ratio (SNR) between defined input and predicted to reference waveform Args: input_waveform: Tensor array with input waveform pred_waveform: Tensor array with predicted waveform from model mean_waveform: Tensor array with real mean waveform from dataset Return: Tensor with differential Signal-to-Noise ratio (SNR) of applied waveforms |
API#
- denspp.offline.metric.snr.calculate_snr(yin: numpy.ndarray, ymean: numpy.ndarray) numpy.ndarray [source]#
Calculating the signal-to-noise ratio [dB] of the input signal compared to mean waveform
- Parameters:
yin – Numpy array with all spike waveforms (raw data)
ymean – Numpy array with mean waveform of corresponding spike frame cluster
- Returns:
Numpy array with SNR of all spike waveforms
- denspp.offline.metric.snr.calculate_snr_tensor(data: torch.Tensor, mean: torch.Tensor) torch.Tensor [source]#
Calculating the Signal-to-Noise (SNR) ratio of the input data Args: data: Tensor with raw data / frame mean: Tensor with class-specific mean data / frame Return: Tensor with SNR value
- denspp.offline.metric.snr.calculate_snr_tensor_waveform(input_waveform: torch.Tensor, mean_waveform: torch.Tensor) torch.Tensor [source]#
Calculation of metric Signal-to-Noise ratio (SNR) of defined input and reference waveform Args: input_waveform: Tensor array with input waveform mean_waveform: Tensor array with real mean waveform from dataset Return: Tensor with differential Signal-to-Noise ratio (SNR) of applied waveforms
- denspp.offline.metric.snr.calculate_dsnr_tensor_waveform(input_waveform: torch.Tensor, pred_waveform: torch.Tensor, mean_waveform: torch.Tensor) torch.Tensor [source]#
Calculation of metric different Signal-to-Noise ratio (SNR) between defined input and predicted to reference waveform Args: input_waveform: Tensor array with input waveform pred_waveform: Tensor array with predicted waveform from model mean_waveform: Tensor array with real mean waveform from dataset Return: Tensor with differential Signal-to-Noise ratio (SNR) of applied waveforms