docstr: Aggregates the (sequence of) multivariate series given as input into one (sequence of)
  series and evaluates the results against true anomalies.
  
  Parameters
  ----------
  actual_anomalies
      The (sequence of) ground truth of the anomalies (1 if it is an anomaly and 0 if not)
  series
      The (sequence of) multivariate binary series to aggregate
  window
      (Sequence of) integer value indicating the number of past samples each point
      represents in the (sequence of) series. The parameter will be used by the
      function ``_window_adjustment_anomalies()`` in darts.ad.utils to transform
      actual_anomalies.
  metric
      Metric function to use. Must be one of "recall", "precision",
      "f1", and "accuracy".
      Default: "recall"
  
  Returns
  -------
  Union[float, Sequence[float]]
      (Sequence of) score for the (sequence of) series
docstr_tok: ["Aggregates","the","(","sequence","of",")","multivariate","series","given","as","input","into","one","(","sequence","of",")","series","and","evaluates","the","results","against","true","anomalies",".","Parameters","--","--","--","--","--","actual_anomalies","The","(","sequence","of",")","ground","truth","of","the","anomalies","(","1","if","it","is","an","anomaly","and","0","if","not",")","series","The","(","sequence","of",")","multivariate","binary","series","to","aggregate","window","(","Sequence","of",")","integer","value","indicating","the","number","of","past","samples","each","point","represents","in","the","(","sequence","of",")","series",".","The","parameter","will","be","used","by","the","function","``","_window_adjustment_anomalies","(",")","``","in","darts.ad.utils","to","transform","actual_anomalies",".","metric","Metric","function","to","use",".","Must","be","one","of","``","recall","''",",","``","precision","''",",","``","f1","''",",","and","``","accuracy","''",".","Default",":","``","recall","''","Returns","--","--","--","-","Union","[","float",",","Sequence","[","float","]","]","(","Sequence","of",")","score","for","the","(","sequence","of",")","series"]
code: def eval_accuracy(
      self,
      actual_anomalies: Sequence[TimeSeries],
      series: Sequence[TimeSeries],
      window: int = 1,
      metric: str = "recall",
  ) -> Union[float, Sequence[float]]:
      """Aggregates the (sequence of) multivariate series given as input into one (sequence of)
      series and evaluates the results against true anomalies.
  
      Parameters
      ----------
      actual_anomalies
          The (sequence of) ground truth of the anomalies (1 if it is an anomaly and 0 if not)
      series
          The (sequence of) multivariate binary series to aggregate
      window
          (Sequence of) integer value indicating the number of past samples each point
          represents in the (sequence of) series. The parameter will be used by the
          function ``_window_adjustment_anomalies()`` in darts.ad.utils to transform
          actual_anomalies.
      metric
          Metric function to use. Must be one of "recall", "precision",
          "f1", and "accuracy".
          Default: "recall"
  
      Returns
      -------
      Union[float, Sequence[float]]
          (Sequence of) score for the (sequence of) series
      """
  
      list_actual_anomalies = _to_list(actual_anomalies)
  
      raise_if_not(
          all(
              [isinstance(s, TimeSeries) for s in list_actual_anomalies]
          ),
          "all series in `actual_anomalies` must be of type TimeSeries.",
      )
  
      raise_if_not(
          all([s.is_deterministic for s in list_actual_anomalies]),
          "all series in `actual_anomalies` must be deterministic (number of samples=1).",
      )
  
      raise_if_not(
          all([s.width == 1 for s in list_actual_anomalies]),
          "all series in `actual_anomalies` must be univariate (width=1).",
      )
  
      raise_if_not(
          len(list_actual_anomalies) == len(_to_list(series)),
          "`actual_anomalies` and `series` must contain the same number of series.",
      )
  
      preds = self.predict(series)
  
      return eval_accuracy_from_binary_prediction(
          list_actual_anomalies, preds, 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 _to_list, eval_accuracy_from_binary_prediction
  from darts.logging import raise_if_not
label_desc: Use image node_id 6 for calling the Aggregator obj's underlying member method code with example usage: obj.eval_accuracy(actual_anomalies, series, window, metric) and returns: eval_accuracy_from_binary_prediction