docstr: Adds a linear equality constraints to the loss functions -
  to ensure all levels of a categorical variable sums to one
docstr_tok: ["Adds","a","linear","equality","constraints","to","the","loss","functions","-","to","ensure","all","levels","of","a","categorical","variable","sums","to","one"]
code: def compute_regularization_loss(self):
      """Adds a linear equality constraints to the loss functions -
      to ensure all levels of a categorical variable sums to one"""
      regularization_loss = tf.constant(0.0)
      for i in range(self.total_CFs):
          for v in self.encoded_categorical_feature_indexes:
              regularization_loss = tf.add(
                  regularization_loss,
                  tf.square(
                      tf.subtract(
                          tf.reduce_sum(
                              self.cfs_frozen[i][0, v[0] : v[-1] + 1]
                          ),
                          1.0,
                      )
                  ),
              )
      return regularization_loss
  
imports: import collections
  import copy
  import random
  import timeit
  import numpy
  import tensorflow
  from dice_ml import diverse_counterfactuals
  from dice_ml.counterfactual_explanations import CounterfactualExplanations
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
label_desc: Use image node_id 11 for calling the DiceTensorFlow1 obj's underlying member method code with example usage: obj.compute_regularization_loss() and returns: regularization_loss