def fit(self) -> None:
        """Fit the PCA transformation to the embeddings.

        The method aggregates embeddings collected during training and fits
        the PCA transformation used for anomaly scoring.
        """
        logger.info("Aggregating the embedding extracted from the training set.")
        embeddings = torch.vstack(self.embeddings)

        logger.info("Fitting a PCA to dataset.")
        self.model.fit(embeddings)
Fit the PCA transformation to the embeddings.

        The method aggregates embeddings collected during training and fits
        the PCA transformation used for anomaly scoring.
        
src/anomalib/models/video/fuvas/lightning_model.py