class_docstr: The trainer for Disjoint LinUCB Contextual Bandit model.
  The model estimates a ridge regression (linear) and only supports dense features.
  
  Args:
      policy: The policy to be trained. Its scorer has to be DisjointLinearRegressionUCB
class_docstr_tok: ["The","trainer","for","Disjoint","LinUCB","Contextual","Bandit","model",".","The","model","estimates","a","ridge","regression","(","linear",")","and","only","supports","dense","features",".","Args",":","policy",":","The","policy","to","be","trained",".","Its","scorer","has","to","be","DisjointLinearRegressionUCB"]
code: def on_train_epoch_end(self):
      super().on_train_epoch_end()
      # at the end of the training epoch calculate the coefficients
      self.scorer._estimate_coefs()
      # apply discount factor here so that next round it's already discounted
      # self.A is V in D-LinUCB paper https://arxiv.org/pdf/1909.09146.pdf
      # This is a simplified version of D-LinUCB, we calculate A = \sum \gamma^t xx^T
      # to discount the old data. See N2441818 for why we do this.
      self.apply_discounting_multiplier()
  
file_path: ReAgent/reagent/training/cb/disjoint_linucb_trainer.py
imports: import logging
  from typing import List, Optional
  import torch
  from reagent.core.configuration import resolve_defaults
  from reagent.core.types import CBInput
  from reagent.gym.policies.policy import Policy
  from reagent.models.disjoint_linucb_predictor import DisjointLinearRegressionUCB
  from reagent.training.cb.base_trainer import BaseCBTrainerWithEval
label_desc: Use image node_id 7 for calling the DisjointLinUCBTrainer obj's underlying member method code with example usage: obj.on_train_epoch_end() without return types