class_docstr: Parent class for all LikelihoodScorer
docstr: For each timestamp of the inputs:
      - the parameters of the considered distribution are fitted on the samples of the probabilistic time series
      - the negative log-likelihood of the determinisitc time series values are computed
  
  If the series is multivariate, the score will be computed on each component independently.
  
  Parameters
  ----------
  actual_series:
      A determinisict time series (number of samples per timestamp must be equal to 1)
  pred_series
      A probabilistic time series (number of samples per timestamp must be higher than 1)
  
  Returns
  -------
  TimeSeries
docstr_tok: ["For","each","timestamp","of","the","inputs",":","-","the","parameters","of","the","considered","distribution","are","fitted","on","the","samples","of","the","probabilistic","time","series","-","the","negative","log-likelihood","of","the","determinisitc","time","series","values","are","computed","If","the","series","is","multivariate",",","the","score","will","be","computed","on","each","component","independently",".","Parameters","--","--","--","--","--","actual_series",":","A","determinisict","time","series","(","number","of","samples","per","timestamp","must","be","equal","to","1",")","pred_series","A","probabilistic","time","series","(","number","of","samples","per","timestamp","must","be","higher","than","1",")","Returns","--","--","--","-","TimeSeries"]
code: def _score_core_from_prediction(
      self,
      actual_series: TimeSeries,
      pred_series: TimeSeries,
  ) -> TimeSeries:
      """For each timestamp of the inputs:
          - the parameters of the considered distribution are fitted on the samples of the probabilistic time series
          - the negative log-likelihood of the determinisitc time series values are computed
  
      If the series is multivariate, the score will be computed on each component independently.
  
      Parameters
      ----------
      actual_series:
          A determinisict time series (number of samples per timestamp must be equal to 1)
      pred_series
          A probabilistic time series (number of samples per timestamp must be higher than 1)
  
      Returns
      -------
      TimeSeries
      """
      actual_series = self._assert_deterministic(
          actual_series, "actual_series"
      )
      self._assert_stochastic(pred_series, "pred_series")
  
      np_actual_series = actual_series.all_values(copy=False)
      np_pred_series = pred_series.all_values(copy=False)
  
      np_anomaly_scores = []
      for component_idx in range(pred_series.width):
          np_anomaly_scores.append(
              self._score_core_nllikelihood(
                  # shape actual: (time_steps, )
                  # shape pred: (time_steps, samples)
                  np_actual_series[:, component_idx].squeeze(-1),
                  np_pred_series[:, component_idx],
              )
          )
  
      anomaly_scores = TimeSeries.from_times_and_values(
          pred_series.time_index, list(zip(*np_anomaly_scores))
      )
  
      def _window_adjustment_series(series: TimeSeries) -> TimeSeries:
          """Slides a window of size self.window along the input series, and replaces the value of
          the input time series by the mean of the values contained in the window (past self.window
          points, including itself).
          A series of length N will be transformed into a series of length N-self.window+1.
          """
  
          if self.window == 1:
              # the process results in replacing every value by itself -> return directly the series
              return series
          else:
              return series.window_transform(
                  transforms={
                      "window": self.window,
                      "function": "mean",
                      "mode": "rolling",
                      "min_periods": self.window,
                  },
                  treat_na="dropna",
              )
  
      return _window_adjustment_series(anomaly_scores)
  
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 2 for calling the NLLScorer obj's underlying member method code with example usage: obj._score_core_from_prediction(actual_series, pred_series) and returns: _window_adjustment_series, series, series