0
$\begingroup$

I am not sure I am asking this on the right place, if not, please redirect me :)

So I am dealing with the following problem. I have a set of data points (local shapely values), and I sum them up and run the sum value through a sigmoid function for the purpose of a binary classification, as shown in the example below:

import math

def sigmoid(x):
  return 1 / (1 + math.exp(-x))

data = np.array([1, 6, -3, -7, 4, -7, 8, -4, -2, 5]) # This is the example data points

result_sig = sigmoid(data.sum())  # Result: 0.731 

In this setting, is it possible to calculate out how much each data point contributed to the final value, in this case, 0.731?

So what I truly mean is, is it possible to make a transform on each data point, so that if I sum the result of this transform of each data point I will get 0.731?

With this I aim at creating a way of calculating how much each feature associated with each data point contributes to the final result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.