def decision_function(self, X):
        """Predict raw anomaly score of X using the fitted detector.

        Parameters
        ----------
        X : numpy.ndarray
            The input samples.

        Returns
        -------
        numpy.ndarray
            The anomaly score of the input samples.
        """
        check_is_fitted(self, ['model', 'best_model_dict'])
        X = check_array(X)
        dataset = TorchDataset(X=X, mean=self.mean,
                               std=self.std, return_idx=True) \
            if self.preprocessing else (TorchDataset(X=X, return_idx=True))
        dataloader = torch.utils.data.DataLoader(dataset,
                                                 batch_size=self.batch_size,
                                                 shuffle=False)
        self.model.eval()

        outlier_scores = np.zeros([X.shape[0], ])
        with torch.no_grad():
            for data, data_idx in dataloader:
                data = data.to(self.device).float()
                reconstructions, rff_features = self.model(data)
                scores = pairwise_distances_no_broadcast(data.cpu().numpy(),
                                                         reconstructions.cpu().numpy())
                outlier_scores[data_idx] = scores
        return outlier_scores
Predict raw anomaly score of X using the fitted detector.

        Parameters
        ----------
        X : numpy.ndarray
            The input samples.

        Returns
        -------
        numpy.ndarray
            The anomaly score of the input samples.
        
pyod/models/ae1svm.py