class_docstr: Parameters
  ----------
  seasonality : int
      Length of seasonality
  seasonality_sm_input : float
      float value between [0, 1], applicable only if `seasonality` > 1. A larger value puts
      more weight on the current seasonality.
      If None, the model will estimate this value.
  level_sm_input : float
      float value between [0.0001, 1]. A larger value puts more weight on the current level.
      If None, the model will estimate this value.
class_docstr_tok: ["Parameters","--","--","--","--","--","seasonality",":","int","Length","of","seasonality","seasonality_sm_input",":","float","float","value","between","[","0",",","1","]",",","applicable","only","if","`","seasonality","`",">","1",".","A","larger","value","puts","more","weight","on","the","current","seasonality",".","If","None",",","the","model","will","estimate","this","value",".","level_sm_input",":","float","float","value","between","[","0.0001",",","1","]",".","A","larger","value","puts","more","weight","on","the","current","level",".","If","None",",","the","model","will","estimate","this","value","."]
docstr: Set attributes which are dependent on data
docstr_tok: ["Set","attributes","which","are","dependent","on","data"]
code: def set_dynamic_attributes(self, df, training_meta):
      """Set attributes which are dependent on data"""
      # compute data-driven prior for seasonality
      if self._seasonality > 1:
          response = training_meta[TrainingMetaKeys.RESPONSE.value]
          response_ma = moving_average(
              response, window=self._seasonality, mode="same"
          )
          adjusted_response = response - response_ma
          # to estimate the "across-group" s.d. as a seasonality prior
          ss = np.zeros(self._seasonality)
          for idx in range(self._seasonality):
              ss[idx] = np.nanmean(
                  adjusted_response[idx :: self._seasonality]
              )
          self.seasonality_sd = np.nanstd(ss)
      else:
          # should not be used anyway; just a placeholder
          self.seasonality_sd = training_meta[
              TrainingMetaKeys.RESPONSE_SD.value
          ]
  
      self._set_valid_response(training_meta)
  
imports: import numpy
  from copy import deepcopy
  import torch
  from enum import Enum
  from ..constants.constants import PredictionKeys, TrainingMetaKeys, PredictionMetaKeys
  from ..exceptions import IllegalArgument, DataInputException
  from .model_template import ModelTemplate
  from ..estimators.stan_estimator import StanEstimatorMCMC, StanEstimatorMAP
  from ..utils.features import moving_average
label_desc: Use image node_id 3 for calling the ETSModel obj's underlying member method code with example usage: obj.set_dynamic_attributes(df, training_meta) without return types