Local-dependence profile

Represent the expected value of the model f over the conditional distribution of X_j given Xj=z

gf,jLD(z)=EX_j|Xj=z{f(X_j|=z)}

This functions works really with if Xj is a categorical variable, but if it continues we can next equation based on Nj defined as the set of observations with the value of Xj close to z.

ˆgjLD(z)=1|Nj|kNjf(x_j|=zk)