docstr: Get the local shap feature importances.
docstr_tok: ["Get","the","local","shap","feature","importances","."]
code: def getFeatureShaps(self, vector):
      """
      Get the local shap feature importances.
      """
      if isinstance(vector, DenseVector):
          dense_values = [float(v) for v in vector]
          return list(self._java_obj.getDenseFeatureShaps(dense_values))
      elif isinstance(vector, SparseVector):
          sparse_indices = [int(i) for i in vector.indices]
          sparse_values = [float(v) for v in vector.values]
          return list(
              self._java_obj.getSparseFeatureShaps(
                  vector.size,
                  sparse_indices,
                  sparse_values,
              ),
          )
      else:
          raise TypeError(
              "Vector argument to getFeatureShaps must be a pyspark.linalg sparse or dense vector type",
          )
  
file_path: SynapseML/lightgbm/src/main/python/synapse/ml/lightgbm/mixin.py
imports: from pyspark.ml.linalg import SparseVector, DenseVector
  from pyspark.ml.common import inherit_doc
  from synapse.ml.core.serialize.java_params_patch import *
label_desc: Use image node_id 4 for calling the LightGBMModelMixin obj's underlying member method code with example usage: obj.getFeatureShaps(vector) and returns: list, list