docstr: Compute weighted distance between two vectors.
docstr_tok: ["Compute","weighted","distance","between","two","vectors","."]
code: def compute_proximity_loss(
      self, x_hat_unnormalized, query_instance_normalized
  ):
      """Compute weighted distance between two vectors."""
      x_hat = self.data_interface.normalize_data(x_hat_unnormalized)
      feature_weights = np.array(
          [
              self.feature_weights_list[0][i]
              for i in self.data_interface.continuous_feature_indexes
          ]
      )
      product = np.multiply(
          (
              abs(x_hat - query_instance_normalized)[
                  :, [self.data_interface.continuous_feature_indexes]
              ]
          ),
          feature_weights,
      )
      product = product.reshape(-1, product.shape[-1])
      proximity_loss = np.sum(product, axis=1)
  
      # Dividing by the sum of feature weights to normalize proximity loss
      return proximity_loss / sum(feature_weights)
  
imports: import copy
  import random
  import timeit
  import numpy
  import pandas
  from raiutils.exceptions import UserConfigValidationException
  from dice_ml import diverse_counterfactuals
  from dice_ml.constants import ModelTypes
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
label_desc: Use image node_id 13 for calling the DiceGenetic obj's underlying member method code with example usage: obj.compute_proximity_loss(x_hat_unnormalized, query_instance_normalized) and returns: unknown