statsmodels.nonparametric.kernel_density.KDEMultivariateConditional.pdf¶
-
KDEMultivariateConditional.pdf(endog_predict=
None, exog_predict=None)[source]¶ Evaluate the probability density function.
- Parameters:¶
- Returns:¶
pdf – The value of the probability density at endog_predict and exog_predict.
- Return type:¶
array_like
Notes
The formula for the conditional probability density is:
\[f(y|x)=\frac{f(x,y)}{f(x)}\]with
\[f(x)=\prod_{s=1}^{q}h_{s}^{-1}k \left(\frac{x_{is}-x_{js}}{h_{s}}\right)\]where \(k\) is the appropriate kernel for each variable.