Generative Model, Discriminative Model.
to figure out probability P(y), because it can be estimated from the dataset by computing class frequencies. P(x|y) is trickier, because usually x is not just one feature, but a set of features: x = xi, …, xn, which might have dependencies between each other. P(x|y) = П P(xi|y, x1, xi-1, xi+1, xn)