class_docstr: This is a class for detecting one-dimensional outliers using z-score (based on the normal distribution).
  See https://en.wikipedia.org/wiki/Standard_score as a reference.
  
  This is a child of `~greykite.common.features.outlier.ZScoreOutlierDetector`,
  which already implements a few processing steps which are useful across
  various outlier detection methods:
  
      - `remove_na`: removing NAs
      - `trim`: trimming the data. This is useful for example when using z-score
      - `diff_from_baseline`: fitting a simple baseline and differencing the input from baseline.
  
  For this method:
  
  - `DetectionResult.scores` are defined as:
      The difference of the value with trimmed mean divided by the trimmed standard deviation
  - `DetectionResult.is_outlier` are defined as: scores which are off by more than `z_score_cutoff`.
  
  Parameters
  ----------
  z_score_cutoff : `float`, default `Z_SCORE_CUTOFF`
      The normal distribution cut-off used to decide outliers.
  
  Attribute
  ---------
  fitted_param: `dict` or None, default None
      This is updated after `self.fit` is run on data.
      This dictionary stores:
  
          - "trimmed_mean": `float`
              Trimmed mean of the input fit data (after trimming).
          - "trimmed_sd": `float`
              Trimmed standard deviation of the input fit data (after trimming).
  
  
  Other Parameters and Attributes:
      See `~greykite.common.features.outlier.BaseOutlierDetector` docstring.
class_docstr_tok: ["This","is","a","class","for","detecting","one-dimensional","outliers","using","z-score","(","based","on","the","normal","distribution",")",".","See","https",":","\/\/en.wikipedia.org\/wiki\/Standard_score","as","a","reference",".","This","is","a","child","of","`","~greykite.common.features.outlier.ZScoreOutlierDetector","`",",","which","already","implements","a","few","processing","steps","which","are","useful","across","various","outlier","detection","methods",":","-","`","remove_na","`",":","removing","NAs","-","`","trim","`",":","trimming","the","data",".","This","is","useful","for","example","when","using","z-score","-","`","diff_from_baseline","`",":","fitting","a","simple","baseline","and","differencing","the","input","from","baseline",".","For","this","method",":","-","`","DetectionResult.scores","`","are","defined","as",":","The","difference","of","the","value","with","trimmed","mean","divided","by","the","trimmed","standard","deviation","-","`","DetectionResult.is_outlier","`","are","defined","as",":","scores","which","are","off","by","more","than","`","z_score_cutoff","`",".","Parameters","--","--","--","--","--","z_score_cutoff",":","`","float","`",",","default","`","Z_SCORE_CUTOFF","`","The","normal","distribution","cut-off","used","to","decide","outliers",".","Attribute","--","--","--","--","-","fitted_param",":","`","dict","`","or","None",",","default","None","This","is","updated","after","`","self.fit","`","is","run","on","data",".","This","dictionary","stores",":","-","``","trimmed_mean","''",":","`","float","`","Trimmed","mean","of","the","input","fit","data","(","after","trimming",")",".","-","``","trimmed_sd","''",":","`","float","`","Trimmed","standard","deviation","of","the","input","fit","data","(","after","trimming",")",".","Other","Parameters","and","Attributes",":","See","`","~greykite.common.features.outlier.BaseOutlierDetector","`","docstring","."]
docstr: The logic of the fit.
  This is an abstract method of the base class:
  `~greykite.common.features.outlier.BaseOutlierDetector`
  and it is implemented for z-score here.
  
  Parameters
  ----------
  y_ready_to_fit: `pandas.series`
      The series which is used for fitting.
  
  Returns
  -------
  None.
  
  Updates
  self.fitted_param: `dict`
      Parameters of the z-score model.
  
          - "trimmed_mean"
          - "trimmed_sd"
  
  self.lower_bound: `float`
      The lower bound to decide if a point is an outlier.
  self.lower_bound: `float`
      The upper bound to decide is a point is an outlier.
  
  Indirectly updates (via `self.fit` method of the parent class):
  
  self.y_diffed: `pandas.Series` or None, default None
  self.y_na_removed: `pandas.Series` or None, default None
  self.y_trimmed: `pandas.Series` or None, default None
  self.y_ready_to_fit: `pandas.Series` or None, default None
docstr_tok: ["The","logic","of","the","fit",".","This","is","an","abstract","method","of","the","base","class",":","`","~greykite.common.features.outlier.BaseOutlierDetector","`","and","it","is","implemented","for","z-score","here",".","Parameters","--","--","--","--","--","y_ready_to_fit",":","`","pandas.series","`","The","series","which","is","used","for","fitting",".","Returns","--","--","--","-","None",".","Updates","self.fitted_param",":","`","dict","`","Parameters","of","the","z-score","model",".","-","``","trimmed_mean","''","-","``","trimmed_sd","''","self.lower_bound",":","`","float","`","The","lower","bound","to","decide","if","a","point","is","an","outlier",".","self.lower_bound",":","`","float","`","The","upper","bound","to","decide","is","a","point","is","an","outlier",".","Indirectly","updates","(","via","`","self.fit","`","method","of","the","parent","class",")",":","self.y_diffed",":","`","pandas.Series","`","or","None",",","default","None","self.y_na_removed",":","`","pandas.Series","`","or","None",",","default","None","self.y_trimmed",":","`","pandas.Series","`","or","None",",","default","None","self.y_ready_to_fit",":","`","pandas.Series","`","or","None",",","default","None"]
code: def fit_logic(self, y_ready_to_fit):
      """The logic of the fit.
      This is an abstract method of the base class:
      `~greykite.common.features.outlier.BaseOutlierDetector`
      and it is implemented for z-score here.
  
      Parameters
      ----------
      y_ready_to_fit: `pandas.series`
          The series which is used for fitting.
  
      Returns
      -------
      None.
  
      Updates
      self.fitted_param: `dict`
          Parameters of the z-score model.
  
              - "trimmed_mean"
              - "trimmed_sd"
  
      self.lower_bound: `float`
          The lower bound to decide if a point is an outlier.
      self.lower_bound: `float`
          The upper bound to decide is a point is an outlier.
  
      Indirectly updates (via `self.fit` method of the parent class):
  
      self.y_diffed: `pandas.Series` or None, default None
      self.y_na_removed: `pandas.Series` or None, default None
      self.y_trimmed: `pandas.Series` or None, default None
      self.y_ready_to_fit: `pandas.Series` or None, default None
      """
      # Calculates z-scores and identifies points with:"
      # Pseudo code: abs(z-score) > `Z_SCORE_CUTOFF` as outliers.
      trimmed_mean = np.mean(y_ready_to_fit)
      trimmed_sd = np.std(y_ready_to_fit)
      self.lower_bound = trimmed_mean - trimmed_sd * self.z_score_cutoff
      self.upper_bound = trimmed_mean + trimmed_sd * self.z_score_cutoff
  
      self.fitted_param = {
          "trimmed_mean": trimmed_mean,
          "trimmed_sd": trimmed_sd,
      }
  
imports: import warnings
  from abc import abstractmethod
  from dataclasses import dataclass
  from dataclasses import field
  from typing import Optional
  import numpy
  import pandas
label_desc: Use image node_id 2 for calling the ZScoreOutlierDetector obj's underlying member method code with example usage: obj.fit_logic(y_ready_to_fit) without return types