def _estimate_weighted_log_prob(self, data: torch.Tensor) -> torch.Tensor:
        """Estimate weighted log probabilities for each component.

        Args:
            data (torch.Tensor): Input data.
                Shape: ``(n_samples, n_features)``.

        Returns:
            torch.Tensor: Weighted log probabilities.
                Shape: ``(n_samples, n_components)``.
        """
        log_prob = torch.stack(
            [
                MultivariateNormal(
                    self.means[comp],
                    self.covariances[comp],
                ).log_prob(data)
                for comp in range(self.n_components)
            ],
            dim=1,
        )
        return log_prob + torch.log(self.weights)
Estimate weighted log probabilities for each component.

        Args:
            data (torch.Tensor): Input data.
                Shape: ``(n_samples, n_features)``.

        Returns:
            torch.Tensor: Weighted log probabilities.
                Shape: ``(n_samples, n_components)``.
        
src/anomalib/models/components/cluster/gmm.py