class_docstr: This class purpose is to find the best forecast from given k forecasts
  to act as baseline for anomaly detection.
  
  This class inherits its parameters and attributes from
  `~greykite.detection.detector.forecast_based.ForecastBasedDetector`
  and all methods apply here as well.
  
  The only addition is on top of the specified parameters to optimize over, this
  class also searches for the best forecast to use out of a number of forecasts
  passed. It achieves that simply by extending the parameter space, given in the input
  `param_iterable` to have one extra parameter: ``"forecast_id"``.
  
  Given that assumption, this class further implements the ``fit`` method fully
  and the user does not need to implement ``fit``.
  
  Therefore user only needs to implement the following:
  
      - ``add_features_one_df``: Note that the class uses this method to fully implement
          ``add_features`` because the class can assume that the same function can
          be used for all k forecasts.
      - ``calc_with_param``: the prediction logic, assuming the optimal param
          is determined.
  
  As an example see how the APE based method is implemented easily by inheriting
  from the current class:
  
      `~greykite.detection.detector.ape_based.APEDetector`
  
  
  Parameters
  ----------
  Solely inherited from
      `~greykite.detection.detector.forecast_based.ForecastBasedDetector`
  
  
  Attributes
  ----------
  Solely inherited from
      `~greykite.detection.detector.forecast_based.ForecastBasedDetector`
class_docstr_tok: ["This","class","purpose","is","to","find","the","best","forecast","from","given","k","forecasts","to","act","as","baseline","for","anomaly","detection",".","This","class","inherits","its","parameters","and","attributes","from","`","~greykite.detection.detector.forecast_based.ForecastBasedDetector","`","and","all","methods","apply","here","as","well",".","The","only","addition","is","on","top","of","the","specified","parameters","to","optimize","over",",","this","class","also","searches","for","the","best","forecast","to","use","out","of","a","number","of","forecasts","passed",".","It","achieves","that","simply","by","extending","the","parameter","space",",","given","in","the","input","`","param_iterable","`","to","have","one","extra","parameter",":","``","``","forecast_id","''","``",".","Given","that","assumption",",","this","class","further","implements","the","``","fit","``","method","fully","and","the","user","does","not","need","to","implement","``","fit","``",".","Therefore","user","only","needs","to","implement","the","following",":","-","``","add_features_one_df","``",":","Note","that","the","class","uses","this","method","to","fully","implement","``","add_features","``","because","the","class","can","assume","that","the","same","function","can","be","used","for","all","k","forecasts",".","-","``","calc_with_param","``",":","the","prediction","logic",",","assuming","the","optimal","param","is","determined",".","As","an","example","see","how","the","APE","based","method","is","implemented","easily","by","inheriting","from","the","current","class",":","`","~greykite.detection.detector.ape_based.APEDetector","`","Parameters","--","--","--","--","--","Solely","inherited","from","`","~greykite.detection.detector.forecast_based.ForecastBasedDetector","`","Attributes","--","--","--","--","--","Solely","inherited","from","`","~greykite.detection.detector.forecast_based.ForecastBasedDetector","`"]
code: def __init__(
      self,
      value_cols=None,
      pred_cols=None,
      is_anomaly_col=None,
      join_cols=None,
      reward=None,
      anomaly_percent_dict=None,
      param_iterable=None,
  ):
      super().__init__(
          value_cols=value_cols,
          pred_cols=pred_cols,
          is_anomaly_col=is_anomaly_col,
          join_cols=join_cols,
          reward=reward,
          anomaly_percent_dict=anomaly_percent_dict,
          param_iterable=param_iterable,
      )
  
imports: from greykite.detection.detector.ad_utils import add_new_params_to_records
  from greykite.detection.detector.forecast_based import ForecastBasedDetector
label_desc: Use image node_id 1 to create a new BestForecastDetector object from inherited base classes: ForecastBasedDetector with example: obj = BestForecastDetector(value_cols, pred_cols, is_anomaly_col, join_cols, reward, anomaly_percent_dict, param_iterable)