Why Logistic Regression is not a generative model? I was reading about the difference between discriminative and generative models, and I read that Discriminative models learn only the boundary between classes hence they are not able to to create new datapoints.  The article states, if we use a generative algorithm, for instance naive bayes, we can create new data points from class “i” basically by choosing features that maximize P(X|Y=class i ). However; the point I did not understand is that could not we also do the same creating in a discriminative model.
Take logistic regression for instance, cannot we create a vector x that  maximizes P(Y=i|X=x) ? Would not this x vector would be our new sample , namely did not we generated a new sample ?
 A: To elaborate on @Bayesian's (correct) answer, consider a logistic regression model where cases of diabetes ($y$) are predicted by sugar intake ($x$).
The model learns $P(y = 1 | x) = \text{logit}^{-1}(\alpha + \beta x)$ - that is, $P(\text{Diabetes}|\text{Sugar intake})$, but since it doesn't learn the distribution of sugar intakes in the population, $P(x)$, it can't generate samples from the distribution of diabetes cases, $P(y)$.
A: The fundamental difference between Generative Model and Discriminative Model is, one is learning about $ P(X,y) $ while discriminative model is learning $ P(y|X) $
According to this definition, Logistic Regression is not a generative model.
For your example "create a vector x that maximizes $ P(y=i|X=x)$ ", it was not a generative model at all. Since it still learn nothing about $ P(X,y) $
Taking a real life example, suppose we got a logistic regression model that predict whether the image is a photo of cat. (Usually this is CNN ,but the logic is the same)
The image $ X $ that maximize $ P(y= cat| X=x) $ is an image that consist of different feature of cats (e.g. tail, eyes) everywhere inside the image. Certain is maximize the probability of being classified as a cat, but you never see this image in reality. Mathematically speaking, if $ x^*  =argmax(P(y= cat| X=x))$ , $ P(x^*,y) $ can still be very low.
