docstr: Plot the results of the anomaly model.
  
  Computes the score on the given series input and shows the different anomaly scores with respect to time.
  
  The plot will be composed of the following:
  
  - the series itself with the output of the filtering model
  - the anomaly score of each scorer. The scorer with different windows will be separated.
  - the actual anomalies, if given.
  
  It is possible to:
  
  - add a title to the figure with the parameter `title`
  - give personalized names for the scorers with `names_of_scorers`
  - show the results of a metric for each anomaly score (AUC_ROC or AUC_PR), if the actual anomalies are given
  
  Parameters
  ----------
  series
      The series to visualize anomalies from.
  actual_anomalies
      The ground truth of the anomalies (1 if it is an anomaly and 0 if not)
  names_of_scorers
      Name of the scorers. Must be a list of length equal to the number of scorers in the anomaly_model.
  title
      Title of the figure
  metric
      Optionally, Scoring function to use. Must be one of "AUC_ROC" and "AUC_PR".
      Default: "AUC_ROC"
  score_kwargs
      parameters for the `.score()` function
docstr_tok: ["Plot","the","results","of","the","anomaly","model",".","Computes","the","score","on","the","given","series","input","and","shows","the","different","anomaly","scores","with","respect","to","time",".","The","plot","will","be","composed","of","the","following",":","-","the","series","itself","with","the","output","of","the","filtering","model","-","the","anomaly","score","of","each","scorer",".","The","scorer","with","different","windows","will","be","separated",".","-","the","actual","anomalies",",","if","given",".","It","is","possible","to",":","-","add","a","title","to","the","figure","with","the","parameter","`","title","`","-","give","personalized","names","for","the","scorers","with","`","names_of_scorers","`","-","show","the","results","of","a","metric","for","each","anomaly","score","(","AUC_ROC","or","AUC_PR",")",",","if","the","actual","anomalies","are","given","Parameters","--","--","--","--","--","series","The","series","to","visualize","anomalies","from",".","actual_anomalies","The","ground","truth","of","the","anomalies","(","1","if","it","is","an","anomaly","and","0","if","not",")","names_of_scorers","Name","of","the","scorers",".","Must","be","a","list","of","length","equal","to","the","number","of","scorers","in","the","anomaly_model",".","title","Title","of","the","figure","metric","Optionally",",","Scoring","function","to","use",".","Must","be","one","of","``","AUC_ROC","''","and","``","AUC_PR","''",".","Default",":","``","AUC_ROC","''","score_kwargs","parameters","for","the","`",".score","(",")","`","function"]
code: def show_anomalies(
      self,
      series: TimeSeries,
      actual_anomalies: TimeSeries = None,
      names_of_scorers: Union[str, Sequence[str]] = None,
      title: str = None,
      metric: str = None,
      **score_kwargs,
  ):
      """Plot the results of the anomaly model.
  
      Computes the score on the given series input and shows the different anomaly scores with respect to time.
  
      The plot will be composed of the following:
  
      - the series itself with the output of the filtering model
      - the anomaly score of each scorer. The scorer with different windows will be separated.
      - the actual anomalies, if given.
  
      It is possible to:
  
      - add a title to the figure with the parameter `title`
      - give personalized names for the scorers with `names_of_scorers`
      - show the results of a metric for each anomaly score (AUC_ROC or AUC_PR), if the actual anomalies are given
  
      Parameters
      ----------
      series
          The series to visualize anomalies from.
      actual_anomalies
          The ground truth of the anomalies (1 if it is an anomaly and 0 if not)
      names_of_scorers
          Name of the scorers. Must be a list of length equal to the number of scorers in the anomaly_model.
      title
          Title of the figure
      metric
          Optionally, Scoring function to use. Must be one of "AUC_ROC" and "AUC_PR".
          Default: "AUC_ROC"
      score_kwargs
          parameters for the `.score()` function
      """
  
      if isinstance(series, Sequence):
          raise_if_not(
              len(series) == 1,
              f"`show_anomalies` expects one series, found a sequence of length {len(series)} as input.",
          )
  
          series = series[0]
  
      anomaly_scores, model_output = self.score(
          series, return_model_prediction=True, **score_kwargs
      )
  
      return self._show_anomalies(
          series,
          model_output=model_output,
          anomaly_scores=anomaly_scores,
          names_of_scorers=names_of_scorers,
          actual_anomalies=actual_anomalies,
          title=title,
          metric=metric,
      )
  
file_path: darts/darts/ad/anomaly_model/filtering_am.py
imports: from typing import Dict, Sequence, Union
  from darts.ad.anomaly_model.anomaly_model import AnomalyModel
  from darts.ad.scorers.scorers import AnomalyScorer
  from darts.ad.utils import _assert_same_length, _to_list
  from darts.logging import get_logger, raise_if_not
  from darts.models.filtering.filtering_model import FilteringModel
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 3 for calling the FilteringAnomalyModel obj's underlying member method code with example usage: obj.show_anomalies(series, actual_anomalies, names_of_scorers, title, metric) and returns: self