code: def __init__(
      self,
      template_splitter,
      split_criterion,
      pred_model,
      drift_detector,
  ):
      super().__init__(
          template_splitter=template_splitter,
          split_criterion=split_criterion,
      )
      self.pred_model = pred_model
      self.drift_detector = drift_detector
  
      self._target_stats = stats.Var()
      self._feat_stats = collections.defaultdict(
          functools.partial(stats.Var)
      )
  
imports: from __future__ import annotations
  import collections
  import functools
  import io
  import math
  import typing
  from river import anomaly, base, drift, linear_model, stats
  from river.tree import split_criterion
  from river.tree import splitter
  from .base import HoeffdingRule
label_desc: Use image node_id 1 to create a new RegRule object from inherited base classes: HoeffdingRule, base, anomaly.base with example: obj = RegRule(template_splitter, split_criterion, pred_model, drift_detector)