class_docstr: Implements methods for applying unconditional and conditional regularization.
docstr: :param E_conditioned: Binary flag indicating whether E-conditioned regularization has to be applied
  :param ci_test: Conditional independence metric used for regularization penalty. Currently, MMD is supported.
  :param kernel_type: Kernel type for MMD penalty. Currently, supports "gaussian" (RBF). If None, distance between mean and second-order statistics (covariances) is used.
  :param gamma: kernel bandwidth for MMD (due to implementation, the kernel bandwdith will actually be the reciprocal of gamma i.e., gamma=1e-6 implies kernel bandwidth=1e6. See `mmd_compute` in utils.py)
docstr_tok: [":","param","E_conditioned",":","Binary","flag","indicating","whether","E-conditioned","regularization","has","to","be","applied",":","param","ci_test",":","Conditional","independence","metric","used","for","regularization","penalty",".","Currently",",","MMD","is","supported",".",":","param","kernel_type",":","Kernel","type","for","MMD","penalty",".","Currently",",","supports","``","gaussian","''","(","RBF",")",".","If","None",",","distance","between","mean","and","second-order","statistics","(","covariances",")","is","used",".",":","param","gamma",":","kernel","bandwidth","for","MMD","(","due","to","implementation",",","the","kernel","bandwdith","will","actually","be","the","reciprocal","of","gamma","i.e.",",","gamma=1e-6","implies","kernel","bandwidth=1e6",".","See","`","mmd_compute","`","in","utils.py",")"]
code: def __init__(
      self,
      E_conditioned,
      ci_test,
      kernel_type,
      gamma,
  ):
      """
      :param E_conditioned: Binary flag indicating whether E-conditioned regularization has to be applied
      :param ci_test: Conditional independence metric used for regularization penalty. Currently, MMD is supported.
      :param kernel_type: Kernel type for MMD penalty. Currently, supports "gaussian" (RBF). If None, distance between mean and second-order statistics (covariances) is used.
      :param gamma: kernel bandwidth for MMD (due to implementation, the kernel bandwdith will actually be the reciprocal of gamma i.e., gamma=1e-6 implies kernel bandwidth=1e6. See `mmd_compute` in utils.py)
      """
  
      self.E_conditioned = (
          E_conditioned  # E-conditioned regularization by default
      )
      self.ci_test = ci_test
      self.kernel_type = kernel_type
      self.gamma = gamma
  
file_path: dowhy/dowhy/causal_prediction/algorithms/regularization.py
imports: import numpy
  import torch
  from torch import nn
  from torch.nn import functional
  from dowhy.causal_prediction.algorithms.utils import mmd_compute
label_desc: Use image node_id 1 to create a new Regularizer object  with example: obj = Regularizer(E_conditioned, ci_test, kernel_type, gamma)