def METHOD_NAME(self, X, y=None):
    """Fit detector. y is ignored in unsupervised methods.
    Parameters
    ----------
    X : numpy array of shape (n_samples, n_features)
        The input samples. Note that `n_features` must equal 1.
    y : Ignored
        Not used, present for API consistency by convention.
    Returns
    -------
    self : object
        Fitted estimator.
    """
    X = check_array(X, ensure_2d=False, force_all_finite=False)
    _check_dim(X)
    self._set_n_classes(y)
    self.threshold_ = self.threshold
    self.median_ = None  # reset median after each call
    self.median_diff_ = None  # reset median_diff after each call
    self.decision_scores_ = self.decision_function(X)
    self._process_decision_scores()
    return self