class_docstr: A class for learning a staircase decision tree.
  
  Args:
      domain: The number of points in the domain.
      n_classes: The number of classes.
class_docstr_tok: ["A","class","for","learning","a","staircase","decision","tree",".","Args",":","domain",":","The","number","of","points","in","the","domain",".","n_classes",":","The","number","of","classes","."]
docstr: Fit statistical thresholds for anomaly detection.
  
  This method fits statistical thresholds for anomaly detection based on input data and labels.
  
  Args:
      data (np.ndarray): The input data.
      labels (np.ndarray): The labels corresponding to the data.
  
  Note:
      This method modifies the internal state of the object to set statistical thresholds.
docstr_tok: ["Fit","statistical","thresholds","for","anomaly","detection",".","This","method","fits","statistical","thresholds","for","anomaly","detection","based","on","input","data","and","labels",".","Args",":","data","(","np.ndarray",")",":","The","input","data",".","labels","(","np.ndarray",")",":","The","labels","corresponding","to","the","data",".","Note",":","This","method","modifies","the","internal","state","of","the","object","to","set","statistical","thresholds","."]
code: def statistic_fit(
      self,
      data: np.ndarray,
      labels: np.ndarray,
  ):
      """
      Fit statistical thresholds for anomaly detection.
  
      This method fits statistical thresholds for anomaly detection based on input data and labels.
  
      Args:
          data (np.ndarray): The input data.
          labels (np.ndarray): The labels corresponding to the data.
  
      Note:
          This method modifies the internal state of the object to set statistical thresholds.
      """
      onehot = np.eye(self.classes)[labels.reshape(-1)]
      onehot.reshape(list(labels.shape) + [self.classes])
      k = onehot * data.T.repeat(self.classes, 1)
      k[k == 0] = np.nan
      med = np.nanmedian(k, 0)
      for i in range(len(med)):
          if med[i] != med[i]:
              med[i] = 0 if i == 0 else med[i - 1]
      mad = 5 * np.nan_to_num(
          np.nanmedian(np.absolute(k - np.nanmedian(k, 0)), 0),
          nan=self.domain / self.classes / 2,
      )
      arr = np.vstack(((med - mad)[:-1], (med + mad)[1:]))
      self._forward_thres[:] = arr.max(0)
      self._back_thres[:] = arr.min(0)
  
      self._stat_forward = self._forward_thres.copy()
      self._stat_back = self._back_thres.copy()
  
imports: from collections import deque
  import operator
  import itertools
  from typing import Optional, List, Tuple
  import numpy
  import warnings
label_desc: Use image node_id 2 for calling the Staircase obj's underlying member method code with example usage: obj.statistic_fit(data, labels) without return types