pyFDN.MatchEnvelope#

class pyFDN.MatchEnvelope(target, *, release_time=0.00028, p=2.0)[source]#

Normalized \(L^p\) error of the smoothed peak envelope.

\(\overline{|e - \hat e|^p} / \overline{|\hat e|^p}\) between the envelopes of prediction and reference, where the envelope is a fast peak follower on \(h^2\), zero-phase low-passed. Sees the arrival and level of individual reflections that an energy decay integrates away. See PeakEnvelope.

Contributed by Riccardo Giampiccolo.

Parameters:
  • target (Any) – Reference IR, shape (n_samples,), (n_samples, n_out) or (n_samples, n_out, n_in). Zero-padded or truncated to the model’s nfft.

  • release_time (float) – Release time of the peak follower in seconds.

  • p (float) – Exponent of the error.

__init__(target, *, release_time=0.00028, p=2.0)[source]#

Methods

__init__(target, *[, release_time, p])

check(model)

Preflight against the model it will train, before the first step.

terms()

Flatten into (weight, loss) leaves.

Attributes

name

Short label, used as the key in pyFDN.TrainLog.loss_log.