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 ?

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.
