def transform(self, features: torch.Tensor) -> torch.Tensor:
        """Transform features using the fitted PCA model.

        Args:
            features (torch.Tensor): Input features of shape ``(n_samples,
                n_features)``.

        Returns:
            torch.Tensor: Transformed features of shape ``(n_samples,
                n_components)``.

        Example:
            >>> data = torch.randn(100, 10)
            >>> pca = PCA(n_components=3)
            >>> pca.fit(data)
            >>> new_data = torch.randn(50, 10)
            >>> transformed = pca.transform(new_data)
            >>> print(transformed.shape)
            torch.Size([50, 3])
        """
        features -= self.mean
        return torch.matmul(features, self.singular_vectors)
Transform features using the fitted PCA model.

        Args:
            features (torch.Tensor): Input features of shape ``(n_samples,
                n_features)``.

        Returns:
            torch.Tensor: Transformed features of shape ``(n_samples,
                n_components)``.

        Example:
            >>> data = torch.randn(100, 10)
            >>> pca = PCA(n_components=3)
            >>> pca.fit(data)
            >>> new_data = torch.randn(50, 10)
            >>> transformed = pca.transform(new_data)
            >>> print(transformed.shape)
            torch.Size([50, 3])
        
src/anomalib/models/components/dimensionality_reduction/pca.py