Why model expected value is computed using a model with input features? This post is kind of related to these two posts here and here
I learnt that model expected value (average prediction) is nothing but performance of the model when all input features are absent.
But I see that this expected value is calculated from a model with input features (whose values are not zero). But it is interpreted as model's simplest performance when X is not present.
I find this difficult to understand. Because, we compute mean(y_pred) from a model that we build using X input features (and their values are not zero).You can refer the code sample from this answer where the average is computed using mean(y_pred). And this is how SHAP package does it as well.
we are taking average from a model which has non-zero values for all predictors? Can I know why is it done this way?
I see that in SHAP average/expected values are calculated this way only,
Can you help me understand why is it done this way?


I was of the understanding that absence of features, mean X=0.

The SHapley Additive Explanations (SHAP) expresses the difference in the prediction of some value, when the $X_i$ is known in comparison to when the $X_i$ is not known.
Not knowing the feature is different from the absence of the feature.
The 'absence of features' or better 'not knowing the feature' needs to be defined/considered carefully. In the context of SHAP it doesn't meant that $X_i = 0$ but it means that we do not know the value of $X_i$. (we still may know the distribution of potential values of $X_i$ or we could estimate this distribution based on the data)
In order to make a prediction, without knowing the value of $X_i$, one would use the expectation of the outcome when $X_i$ is unknown (we compute the expectation of the potential outcome over the known or estimated distribution of $X_i$). Using $X_i = 0$ is not a good way to make a prediction when $X_i$ is unknown.
