xai4tsc.utils.animation ======================= .. py:module:: xai4tsc.utils.animation .. autoapi-nested-parse:: Perturbation-process animations (GIF) for the frequency / time-frequency metrics. Each animation shows a single sample's perturbation trajectory over the metric's flipping steps: the reconstructed time signal, the perturbed frequency / time-frequency representation (with the static relevance), and the prediction curve building up. Frames are produced by the perturbation metrics' ``animate`` method (opt-in frame collection); output is always a GIF via Matplotlib's built-in ``PillowWriter`` (no ffmpeg dependency). Attributes ---------- .. autoapisummary:: xai4tsc.utils.animation.logger Classes ------- .. autoapisummary:: xai4tsc.utils.animation.FrequencyPerturbationAnimation xai4tsc.utils.animation.TimeFrequencyPerturbationAnimation Module Contents --------------- .. py:data:: logger .. py:class:: FrequencyPerturbationAnimation(frames: dict, step: int = 1, max_frames: int = 300) Bases: :py:obj:`_PerturbationAnimation` Animate a frequency-domain perturbation: spectrum + time signal + prediction. .. py:class:: TimeFrequencyPerturbationAnimation(frames: dict, step: int = 1, max_frames: int = 300) Bases: :py:obj:`_PerturbationAnimation` Animate a TF perturbation: relevance + spectrogram + time signal + prediction.