def fit(self) -> None:
        """Fit the density estimators to the extracted features from the training set.

        Raises:
            ValueError: If no regions were extracted during training.
        """
        if self.total_detections == 0:
            msg = "No regions were extracted during training."
            raise ValueError(msg)
        self.model.density_estimator.fit()
Fit the density estimators to the extracted features from the training set.

        Raises:
            ValueError: If no regions were extracted during training.
        
src/anomalib/models/video/ai_vad/lightning_model.py