<ol>
<li><p>Yes, but definition of &quot;average&quot; is important. If you supply a &quot;background&quot; dataset, your explanations will be calculated against this background, not against the whole dataset. As far as &quot;relative to the average&quot; of the background, one needs to understand shap values are average marginal contributions over all possible coalitions. So as far as SHAP values are concerned, you fix coalition(s), and the rest is yes, averaged. This allows fitting model once, and then passing different coalitions (with the rest averaged) through the model that was trained only once. This is where SHAP time savings come from.<br />
If you're interested in more you may visit original <a href="https://arxiv.org/abs/1705.07874" rel="nofollow noreferrer">paper</a> or this <a href="https://ai.plainenglish.io/understanding-shap-for-interpretable-machine-learning-35e8639d03db" rel="nofollow noreferrer">blog</a>.</p>
</li>
<li><p>Yes. You supply a single data row as background, for a binary classification e.g., supply another class' data row for explanation, and see which feature, and by how much, changed class output.</p>
</li>
</ol>
SHAP for a single data point, instead of average prediction of entire dataset
<p>I am trying to explain a regression model based on LightGBM using <code>SHAP</code>. I'm using the</p>
<pre><code>shap.TreeExplainer(&lt;lightgbm model&gt;).shap_values(X) 
</code></pre>
<p>method to get the <code>SHAP</code> values, where X is the entire training dataset. These <code>SHAP</code> values give me comparison of an individual prediction, compared to the average prediction of the entire dataset.</p>
<p>In the online book by Christopher Molnar, section 5.9.4, he mentions that:</p>
<blockquote>
<p>&quot;Instead of comparing a prediction to the average prediction of the entire dataset, you could compare it to a subset or even to a single data point.&quot;</p>
</blockquote>
<p>I have a couple of questions regarding this:</p>
<ol>
<li>Am I correct to interpret that if, instead of passing the entire training dataset, I pass a subset of say 20 observations, then the SHAP values returned will be relative to the average of these 20 observations? This will be the equivalent of &quot;subset&quot; that Christopher Molnar mentioned in his book</li>
<li>Assuming that the answer to question 1 is yes, what if, instead of generating SHAP values relative to the average of 20 observations, I want to generate SHAP values relative to one specific observation. Christopher Molnar seems to imply that is possible. If it is possible, how do I do that?</li>
</ol>
<p>Thank you in advance for the guidance!</p>