A Naive Bayes predictor makes its predictions using this formula:$$P(Y=y|X=x) = \alpha P(Y=y)\prod_i P(X_i=x_i|Y=y)$$where $\alpha$ is a normalizing factor. This requires estimating the parameters $P(X_i=x_i|Y=y)$ from the data. If we do this with $k$-smoothing, then we get the estimate$$\hat{P}(X_i=x_i|Y=y) = \frac{\#\{X_i=x_i,Y=y\} + k}{\#\{Y=y\}+n_ik}$$where there are $n_i$ possible values for $X_i$. I'm fine with this. However, for the prior, we have$$\hat{P}(Y=y) = \frac{\#\{Y=y\}}{N}$$where there are $N$ examples in the data set. Why don't we also smooth the prior? Or rather, do we smooth the prior? If so, what smoothing parameter do we choose? It seems slightly silly to also choose $k$, since we're doing a different calculation. Is there a consensus? Or does it not matter too much?
Smoothing in Naive Bayes model
machine learning;probability theory;statistics