yzhao062 / pytod

TOD: GPU-accelerated Outlier Detection via Tensor Operations
https://arxiv.org/abs/2110.14007
BSD 2-Clause "Simplified" License
173 stars 24 forks source link

decision_function is none: #8

Open gaofangmigong opened 10 months ago

gaofangmigong commented 10 months ago
def decision_function(self, X):
    """Predict raw anomaly score of X using the fitted detector.
     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.
    """
    # use multi-thread execution
    if hasattr(self, 'X_train'):
        original_size = X.shape[0]
        X = np.concatenate((self.X_train, X), axis=0)

    # return decision_scores_.ravel()