-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
demo code is:
with DeepExplain(session=sess) as de:
explainer = de.get_explainer('deeplift', T=model[1], X=model[0],
baseline=df_train_feature.values[0].astype(float))
attributions = explainer.run(df_test_feature.values.astype(float))
preds = sess.run(model[1], feed_dict={model[0]: df_test_feature.values.astype(float)})
baseline_pred = sess.run(model[1], feed_dict={model[0]: np.expand_dims(df_train_feature.values[0].astype(float), axis=0)})
print('baseline_pred:{}'.format(baseline_pred))
diff = np.squeeze(preds) - attributions.sum(1)
plt.plot(diff)
plt.title('{}'.format('pred_MINUS_sum_of_attr'))
plt.show()
I expected the 'diff' is near baseline_pred(3.473), but from the above plot, It centered at 0 and has large variance.
I'm very confused, can anybody give me some explanations? thanks a million
Metadata
Metadata
Assignees
Labels
No labels
