class_docstr: Class for estimating the delta for MSES.
class_docstr_tok: ["Class","for","estimating","the","delta","for","MSES","."]
docstr: Updates the delta statistics: velocity, acceleration and velocity
  standard error at each scale using new data.
  
  :param new_data: new datapoints in the time series.
code: def train(self, new_data: UnivariateTimeSeries):
      """
      Updates the delta statistics: velocity, acceleration and velocity
      standard error at each scale using new data.
  
      :param new_data: new datapoints in the time series.
      """
      needed_data = self.data.concat(new_data)
      for scale, stat in self.stats.items():
          if len(needed_data) < scale + 1:
              continue
          # compute and update velocity
          vels = stat.lag(needed_data.to_ts())
          bs = min(len(new_data), len(vels))
          stat.update_velocity(vels[-bs:].univariates[vels.names[0]])
          # compute and update acceleration
          if (
              len(needed_data) >= 2 * scale + 1
              and scale <= self.acc_max_scale
          ):
              accs = stat.lag(vels)
              bs = min(len(new_data), len(accs))
              stat.update_acceleration(
                  accs[-bs:].univariates[accs.names[0]]
              )
      # update data to retain for future updates
      self.data = needed_data
  
imports: import logging
  from math import floor
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from merlion.utils.time_series import TimeSeries, UnivariateTimeSeries, assert_equal_timedeltas
  from merlion.utils.istat import ExponentialMovingAverage, RecencyWeightedVariance
  from merlion.utils.resample import to_pd_datetime, to_timestamp
  from merlion.transform.moving_average import LagTransform
  from merlion.transform.resample import TemporalResample
  from merlion.models.forecast.base import ForecasterBase, ForecasterConfig
label_desc: Use image node_id 9 for calling the DeltaEstimator obj's underlying member method code with example usage: obj.train(new_data) without return types