class_docstr: Config for providing parameters to the Anomaly Detection library.
class_docstr_tok: ["Config","for","providing","parameters","to","the","Anomaly","Detection","library","."]
docstr: Converts an instance of the `ADConfig` class to its dictionary format.
docstr_tok: ["Converts","an","instance","of","the","`","ADConfig","`","class","to","its","dictionary","format","."]
code: def to_dict(self) -> dict:
      """Converts an instance of the `ADConfig` class to its dictionary format."""
      result = dict()
      result["volatility_features_list"] = from_union(
          [from_list_list_str, from_none], self.volatility_features_list
      )
      result["coverage_grid"] = from_union(
          [from_list_float, from_none], self.coverage_grid
      )
      result["ape_grid"] = from_union(
          [from_list_float, from_none], self.ape_grid
      )
      result["sape_grid"] = from_union(
          [from_list_float, from_none], self.sape_grid
      )
      result["min_admissible_value"] = from_union(
          [from_float, from_none], self.min_admissible_value
      )
      result["max_admissible_value"] = from_union(
          [from_float, from_none], self.max_admissible_value
      )
      result["objective"] = from_union(
          [from_str, from_none], self.objective
      )
      result["target_precision"] = from_union(
          [from_float, from_none], self.target_precision
      )
      result["target_recall"] = from_union(
          [from_float, from_none], self.target_recall
      )
      result["soft_window_size"] = from_union(
          [from_int, from_none], self.soft_window_size
      )
      result["target_anomaly_percent"] = from_union(
          [from_float, from_none], self.target_anomaly_percent
      )
      result["variance_scaling"] = from_union(
          [from_bool, from_none], self.variance_scaling
      )
  
      return result
  
file_path: greykite/greykite/detection/detector/config.py
imports: import json
  from dataclasses import dataclass
  from typing import Any
  from typing import List
  from typing import Optional
  from greykite.common.python_utils import assert_equal
  from greykite.framework.templates.autogen.forecast_config import from_bool
  from greykite.framework.templates.autogen.forecast_config import from_float
  from greykite.framework.templates.autogen.forecast_config import from_int
  from greykite.framework.templates.autogen.forecast_config import from_list_float
  from greykite.framework.templates.autogen.forecast_config import from_list_list_str
  from greykite.framework.templates.autogen.forecast_config import from_none
  from greykite.framework.templates.autogen.forecast_config import from_str
  from greykite.framework.templates.autogen.forecast_config import from_union
label_desc: Use image node_id 2 for calling the ADConfig obj's underlying member method code with example usage: obj.to_dict() and returns: result