class_docstr: Base class of scorers that do need training.
docstr: Computes the anomaly score of the given time series, and returns the score
  of an agnostic threshold metric.
  
  Parameters
  ----------
  actual_anomalies
      The ground truth of the anomalies (1 if it is an anomaly and 0 if not)
  series
      The (sequence of) series to detect anomalies from.
  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 `series` is a univariate series (dimension=1).
          - ``Sequence[float]``
  
              * if `series` is a multivariate series (dimension>1), returns one
              value per dimension, or
              * if `series` is a sequence of univariate series, returns one value
              per series
          - ``Sequence[Sequence[float]]]`` if `series` is a sequence 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","of","the","given","time","series",",","and","returns","the","score","of","an","agnostic","threshold","metric",".","Parameters","--","--","--","--","--","actual_anomalies","The","ground","truth","of","the","anomalies","(","1","if","it","is","an","anomaly","and","0","if","not",")","series","The","(","sequence","of",")","series","to","detect","anomalies","from",".","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","`","series","`","is","a","univariate","series","(","dimension=1",")",".","-","``","Sequence","[","float","]","``","*","if","`","series","`","is","a","multivariate","series","(","dimension",">","1",")",",","returns","one","value","per","dimension",",","or","*","if","`","series","`","is","a","sequence","of","univariate","series",",","returns","one","value","per","series","-","``","Sequence","[","Sequence","[","float","]","]","]","``","if","`","series","`","is","a","sequence","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(
      self,
      actual_anomalies: Union[TimeSeries, Sequence[TimeSeries]],
      series: Union[TimeSeries, Sequence[TimeSeries]],
      metric: str = "AUC_ROC",
  ) -> Union[float, Sequence[float], Sequence[Sequence[float]]]:
      """Computes the anomaly score of the given time series, and returns the score
      of an agnostic threshold metric.
  
      Parameters
      ----------
      actual_anomalies
          The ground truth of the anomalies (1 if it is an anomaly and 0 if not)
      series
          The (sequence of) series to detect anomalies from.
      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 `series` is a univariate series (dimension=1).
              - ``Sequence[float]``
  
                  * if `series` is a multivariate series (dimension>1), returns one
                  value per dimension, or
                  * if `series` is a sequence of univariate series, returns one value
                  per series
              - ``Sequence[Sequence[float]]]`` if `series` is a sequence 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(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 3 for calling the FittableAnomalyScorer obj's underlying member method code with example usage: obj.eval_accuracy(actual_anomalies, series, metric) and returns: eval_accuracy_from_scores