class_docstr: Base class for all anomaly scorers
docstr: Computes the anomaly score between `actual_series` and `pred_series`, and returns the score
  of an agnostic threshold metric.
  
  Parameters
  ----------
  actual_anomalies
      The (sequence of) ground truth of the anomalies (1 if it is an anomaly and 0 if not)
  actual_series
      The (sequence of) actual series.
  pred_series
      The (sequence of) predicted series.
  metric
      Optionally, metric function to use. Must be one of "AUC_ROC" and "AUC_PR".
      Default: "AUC_ROC"
  
  Returns
  -------
  Union[float, Sequence[float], Sequence[Sequence[float]]]
      Score of an agnostic threshold metric for the computed anomaly score
          - ``float`` if `actual_series` and `actual_series` are univariate series (dimension=1).
          - ``Sequence[float]``
  
              * if `actual_series` and `actual_series` are multivariate series (dimension>1),
              returns one value per dimension, or
              * if `actual_series` and `actual_series` are sequences of univariate series,
              returns one value per series
          - ``Sequence[Sequence[float]]]`` if `actual_series` and `actual_series` are sequences
          of multivariate series. Outer Sequence is over the sequence input and the inner
          Sequence is over the dimensions of each element in the sequence input.
docstr_tok: ["Computes","the","anomaly","score","between","`","actual_series","`","and","`","pred_series","`",",","and","returns","the","score","of","an","agnostic","threshold","metric",".","Parameters","--","--","--","--","--","actual_anomalies","The","(","sequence","of",")","ground","truth","of","the","anomalies","(","1","if","it","is","an","anomaly","and","0","if","not",")","actual_series","The","(","sequence","of",")","actual","series",".","pred_series","The","(","sequence","of",")","predicted","series",".","metric","Optionally",",","metric","function","to","use",".","Must","be","one","of","``","AUC_ROC","''","and","``","AUC_PR","''",".","Default",":","``","AUC_ROC","''","Returns","--","--","--","-","Union","[","float",",","Sequence","[","float","]",",","Sequence","[","Sequence","[","float","]","]","]","Score","of","an","agnostic","threshold","metric","for","the","computed","anomaly","score","-","``","float","``","if","`","actual_series","`","and","`","actual_series","`","are","univariate","series","(","dimension=1",")",".","-","``","Sequence","[","float","]","``","*","if","`","actual_series","`","and","`","actual_series","`","are","multivariate","series","(","dimension",">","1",")",",","returns","one","value","per","dimension",",","or","*","if","`","actual_series","`","and","`","actual_series","`","are","sequences","of","univariate","series",",","returns","one","value","per","series","-","``","Sequence","[","Sequence","[","float","]","]","]","``","if","`","actual_series","`","and","`","actual_series","`","are","sequences","of","multivariate","series",".","Outer","Sequence","is","over","the","sequence","input","and","the","inner","Sequence","is","over","the","dimensions","of","each","element","in","the","sequence","input","."]
code: def eval_accuracy_from_prediction(
      self,
      actual_anomalies: Union[TimeSeries, Sequence[TimeSeries]],
      actual_series: Union[TimeSeries, Sequence[TimeSeries]],
      pred_series: Union[TimeSeries, Sequence[TimeSeries]],
      metric: str = "AUC_ROC",
  ) -> Union[float, Sequence[float], Sequence[Sequence[float]]]:
      """Computes the anomaly score between `actual_series` and `pred_series`, and returns the score
      of an agnostic threshold metric.
  
      Parameters
      ----------
      actual_anomalies
          The (sequence of) ground truth of the anomalies (1 if it is an anomaly and 0 if not)
      actual_series
          The (sequence of) actual series.
      pred_series
          The (sequence of) predicted series.
      metric
          Optionally, metric function to use. Must be one of "AUC_ROC" and "AUC_PR".
          Default: "AUC_ROC"
  
      Returns
      -------
      Union[float, Sequence[float], Sequence[Sequence[float]]]
          Score of an agnostic threshold metric for the computed anomaly score
              - ``float`` if `actual_series` and `actual_series` are univariate series (dimension=1).
              - ``Sequence[float]``
  
                  * if `actual_series` and `actual_series` are multivariate series (dimension>1),
                  returns one value per dimension, or
                  * if `actual_series` and `actual_series` are sequences of univariate series,
                  returns one value per series
              - ``Sequence[Sequence[float]]]`` if `actual_series` and `actual_series` are sequences
              of multivariate series. Outer Sequence is over the sequence input and the inner
              Sequence is over the dimensions of each element in the sequence input.
      """
      actual_anomalies = _to_list(actual_anomalies)
      self._check_univariate_scorer(actual_anomalies)
  
      anomaly_score = self.score_from_prediction(
          actual_series, pred_series
      )
  
      return eval_accuracy_from_scores(
          actual_anomalies, anomaly_score, self.window, metric
      )
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Sequence, Union
  import numpy
  from darts import TimeSeries
  from darts.ad.utils import _assert_same_length, _assert_timeseries, _intersect, _sanity_check_two_series, _to_list, eval_accuracy_from_scores, show_anomalies_from_scores
  from darts.logging import get_logger, raise_if_not
label_desc: Use image node_id 8 for calling the AnomalyScorer obj's underlying member method code with example usage: obj.eval_accuracy_from_prediction(actual_anomalies, actual_series, pred_series, metric) and returns: eval_accuracy_from_scores