class_docstr: Detector that detects anomaly based on a outlier detection model.
  
  This detector peforms time-independent outlier detection using given model,
  and identifies a time points as anomalous if it is labelled as an outlier.
  
  Parameters
  ----------
  model: object
      An outlier detection model to be used. Same as a outlier detection
      model in scikit-learn (e.g. EllipticEnvelope, IsolationForest,
      LocalOutlierFactor), the model should minimally have a `fit_predict`
      method, or `fit` and `predict` methods. The `fit_predict` or `predict`
      method should return an array of outlier indicators where outliers are
      marked by -1.
class_docstr_tok: ["Detector","that","detects","anomaly","based","on","a","outlier","detection","model",".","This","detector","peforms","time-independent","outlier","detection","using","given","model",",","and","identifies","a","time","points","as","anomalous","if","it","is","labelled","as","an","outlier",".","Parameters","--","--","--","--","--","model",":","object","An","outlier","detection","model","to","be","used",".","Same","as","a","outlier","detection","model","in","scikit-learn","(","e.g",".","EllipticEnvelope",",","IsolationForest",",","LocalOutlierFactor",")",",","the","model","should","minimally","have","a","`","fit_predict","`","method",",","or","`","fit","`","and","`","predict","`","methods",".","The","`","fit_predict","`","or","`","predict","`","method","should","return","an","array","of","outlier","indicators","where","outliers","are","marked","by","-1","."]
code: def _predict_core(self, df: pd.DataFrame) -> pd.Series:
      is_outliers = pd.Series(float("nan"), index=df.index)
      if not df.dropna().empty:
          if hasattr(self.model, "predict"):
              is_outliers.loc[df.dropna().index] = (
                  self.model.predict(df.dropna()) == -1
              )
          else:
              is_outliers.loc[df.dropna().index] = (
                  self.model.fit_predict(df.dropna()) == -1
              )
      predicted = pd.Series(is_outliers == 1, index=df.index)
      predicted[is_outliers.isna()] = float("nan")
      return predicted
  
imports: from collections import Counter
  from typing import Any, Callable, Dict, Optional, Tuple
  import pandas
  from .._detector_base import _TrainableMultivariateDetector
  from ..aggregator import AndAggregator
  from ..detector import InterQuartileRangeAD, ThresholdAD
  from ..pipe import Pipeline, Pipenet
  from ..transformer import CustomizedTransformer1D, PcaReconstructionError, RegressionResidual
label_desc: Use image node_id 4 for calling the OutlierDetector obj's underlying member method code with example usage: obj._predict_core(df) and returns: predicted