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

        The anomaly score of an input sample is computed based on different
        detector algorithms. For consistency, outliers are assigned with
        larger anomaly scores.

        Parameters
        ----------
        X : numpy array of shape (n_samples, n_features)
            The training input samples. Sparse matrices are accepted only
            if they are supported by the base estimator.

        Returns
        -------
        anomaly_scores : numpy array of shape (n_samples,)
            The anomaly score of the input samples.
        """
        self.model.eval()

        dataset = PyODDataset(X=X, mean=self.mean, std=self.std)
        dataloader = torch.utils.data.DataLoader(dataset,
                                                 batch_size=self.batch_size,
                                                 shuffle=False)

        X_reconst = np.zeros([X.shape[0], ])
        with torch.no_grad():
            for data, data_idx in train_loader:
                # print(epoch, data.shape)
                data_cuda = data.to(self.device).float()
                # idx = batch[1]
                # this is the outlier score
                X_reconst[data_idx] = pairwise_distances_no_broadcast(data,
                                                                      self.model(
                                                                          data_cuda).cpu().numpy())

        return X_reconst
Predict raw anomaly score of X using the fitted detector.

        The anomaly score of an input sample is computed based on different
        detector algorithms. For consistency, outliers are assigned with
        larger anomaly scores.

        Parameters
        ----------
        X : numpy array of shape (n_samples, n_features)
            The training input samples. Sparse matrices are accepted only
            if they are supported by the base estimator.

        Returns
        -------
        anomaly_scores : numpy array of shape (n_samples,)
            The anomaly score of the input samples.
        
examples/temp_do_not_use.py