docstr: Computes the DPP of a matrix.
docstr_tok: ["Computes","the","DPP","of","a","matrix","."]
code: def dpp_style(self, submethod):
      """Computes the DPP of a matrix."""
      det_entries = torch.ones((self.total_CFs, self.total_CFs))
      if submethod == "inverse_dist":
          for i in range(self.total_CFs):
              for j in range(self.total_CFs):
                  det_entries[(i, j)] = 1.0 / (
                      1.0 + self.compute_dist(self.cfs[i], self.cfs[j])
                  )
                  if i == j:
                      det_entries[(i, j)] += 0.0001
  
      elif submethod == "exponential_dist":
          for i in range(self.total_CFs):
              for j in range(self.total_CFs):
                  det_entries[(i, j)] = 1.0 / (
                      torch.exp(
                          self.compute_dist(self.cfs[i], self.cfs[j])
                      )
                  )
                  if i == j:
                      det_entries[(i, j)] += 0.0001
  
      diversity_loss = torch.det(det_entries)
      return diversity_loss
  
imports: import copy
  import random
  import timeit
  import numpy
  import torch
  from dice_ml import diverse_counterfactuals
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
label_desc: Use image node_id 13 for calling the DicePyTorch obj's underlying member method code with example usage: obj.dpp_style(submethod) and returns: diversity_loss