class_docstr: Base class for an anomaly detection model.
class_docstr_tok: ["Base","class","for","an","anomaly","detection","model","."]
docstr: :return: the default config to use when training the post-rule.
docstr_tok: [":","return",":","the","default","config","to","use","when","training","the","post-rule","."]
code: def _default_post_rule_train_config(self):
      """
      :return: the default config to use when training the post-rule.
      """
      from merlion.evaluate.anomaly import TSADMetric
  
      t = self.config._default_threshold.alm_threshold
      # self.calibrator is only None if calibration has been manually disabled
      # and the anomaly scores are expected to be calibrated by get_anomaly_score(). If
      # self.config.enable_calibrator, the model will return a calibrated score.
      if (
          self.calibrator is None
          or self.config.enable_calibrator
          or t == 0
      ):
          q = None
      # otherwise, choose the quantile corresponding to the given threshold
      else:
          q = 2 * norm.cdf(t) - 1
      return dict(metric=TSADMetric.F1, unsup_quantile=q)
  
imports: from abc import abstractmethod
  import copy
  import inspect
  import logging
  from typing import Any, Dict, List, Union
  import pandas
  from scipy.stats import norm
  from merlion.models.base import Config, ModelBase, MultipleTimeseriesModelMixin
  from merlion.plot import Figure, MTSFigure
  from merlion.post_process.calibrate import AnomScoreCalibrator
  from merlion.post_process.factory import PostRuleFactory
  from merlion.post_process.sequence import PostRuleSequence
  from merlion.post_process.threshold import AggregateAlarms, Threshold
  from merlion.utils import TimeSeries, UnivariateTimeSeries
  from merlion.utils.misc import call_with_accepted_kwargs
label_desc: Use image node_id 2 for calling the DetectorBase obj's underlying member method code with example usage: obj._default_post_rule_train_config() and returns: dict