title: SHAP for a single data point, instead of average prediction of entire dataset
body: <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>