This is from https://scikit-learn.org/stable/modules/naive_bayes.html
In the last line it says "and we can use Maximum A Posteriori (MAP) estimation to estimate P(y) and P(xi|y); the former is then the relative frequency of class y in the training set."
Why would we estimate P(y) and P(xi|y) through MAP? Shouldn't we calculate P(y) and P(xi|y) through training data?