{
  "id": 101899,
  "title": "CS229 lecture notes on GANs by Andrew Ng",
  "url": "/competitions/generative-dog-images/discussion/101899",
  "author_name": "",
  "post_date": "2019-07-29T13:28:48.557441700Z",
  "votes": 7,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I found an intuitive description of generative learning algorithms in this PDF from a course taught at Stanford. <a href=\"http://cs229.stanford.edu/notes/cs229-notes2.pdf\">http://cs229.stanford.edu/notes/cs229-notes2.pdf</a> </p>\n\n<p>Following is from the document:\nConsider a classification problem in which we want to learn to distinguish between elephants (y = 1) and dogs (y = 0), based on some features of an animal. Given a training set, an algorithm like logistic regression or the perceptron algorithm (basically) tries to find a straight line—that is, a decision boundary—that separates the elephants and dogs. Then, to classify a new animal as either an elephant or a dog, it checks on which side of the decision boundary it falls, and makes its prediction accordingly.\nHere’s a different approach. First, looking at elephants, we can build a model of what elephants look like. Then, looking at dogs, we can build a separate model of what dogs look like. Finally, to classify a new animal, we can match the new animal against the elephant model, and match it against the dog model, to see whether the new animal looks more like the elephants or more like the dogs we had seen in the training set.\nAlgorithms that try to learn p(y|x) directly (such as logistic regression), or algorithms that try to learn mappings directly from the space of inputs X to the labels {0, 1}, (such as the perceptron algorithm) are called discrim- inative learning algorithms. Here, we’ll talk about algorithms that instead try to model p(x|y) (and p(y)). These algorithms are called generative learning algorithms. For instance, if y indicates whether an example is a dog (0) or an elephant (1), then p(x|y = 0) models the distribution of dogs’ features, and p(x|y = 1) models the distribution of elephants’ features.</p>\n\n<p>It also mentions Gaussian Discriminant Analysis (GDA).</p>",
  "messages": [
    {
      "id": "586650",
      "postDate": "07/29/2019 13:28:48",
      "content": "<p>I found an intuitive description of generative learning algorithms in this PDF from a course taught at Stanford. <a href=\"http://cs229.stanford.edu/notes/cs229-notes2.pdf\">http://cs229.stanford.edu/notes/cs229-notes2.pdf</a> </p>\n\n<p>Following is from the document:\nConsider a classification problem in which we want to learn to distinguish between elephants (y = 1) and dogs (y = 0), based on some features of an animal. Given a training set, an algorithm like logistic regression or the perceptron algorithm (basically) tries to find a straight line—that is, a decision boundary—that separates the elephants and dogs. Then, to classify a new animal as either an elephant or a dog, it checks on which side of the decision boundary it falls, and makes its prediction accordingly.\nHere’s a different approach. First, looking at elephants, we can build a model of what elephants look like. Then, looking at dogs, we can build a separate model of what dogs look like. Finally, to classify a new animal, we can match the new animal against the elephant model, and match it against the dog model, to see whether the new animal looks more like the elephants or more like the dogs we had seen in the training set.\nAlgorithms that try to learn p(y|x) directly (such as logistic regression), or algorithms that try to learn mappings directly from the space of inputs X to the labels {0, 1}, (such as the perceptron algorithm) are called discrim- inative learning algorithms. Here, we’ll talk about algorithms that instead try to model p(x|y) (and p(y)). These algorithms are called generative learning algorithms. For instance, if y indicates whether an example is a dog (0) or an elephant (1), then p(x|y = 0) models the distribution of dogs’ features, and p(x|y = 1) models the distribution of elephants’ features.</p>\n\n<p>It also mentions Gaussian Discriminant Analysis (GDA).</p>",
      "rawMarkdown": "I found an intuitive description of generative learning algorithms in this PDF from a course taught at Stanford. http://cs229.stanford.edu/notes/cs229-notes2.pdf \n\nFollowing is from the document:\nConsider a classification problem in which we want to learn to distinguish between elephants (y = 1) and dogs (y = 0), based on some features of an animal. Given a training set, an algorithm like logistic regression or the perceptron algorithm (basically) tries to find a straight line—that is, a decision boundary—that separates the elephants and dogs. Then, to classify a new animal as either an elephant or a dog, it checks on which side of the decision boundary it falls, and makes its prediction accordingly.\nHere’s a different approach. First, looking at elephants, we can build a model of what elephants look like. Then, looking at dogs, we can build a separate model of what dogs look like. Finally, to classify a new animal, we can match the new animal against the elephant model, and match it against the dog model, to see whether the new animal looks more like the elephants or more like the dogs we had seen in the training set.\nAlgorithms that try to learn p(y|x) directly (such as logistic regression), or algorithms that try to learn mappings directly from the space of inputs X to the labels {0, 1}, (such as the perceptron algorithm) are called discrim- inative learning algorithms. Here, we’ll talk about algorithms that instead try to model p(x|y) (and p(y)). These algorithms are called generative learning algorithms. For instance, if y indicates whether an example is a dog (0) or an elephant (1), then p(x|y = 0) models the distribution of dogs’ features, and p(x|y = 1) models the distribution of elephants’ features.\n\nIt also mentions Gaussian Discriminant Analysis (GDA).",
      "votes": null
    },
    {
      "id": "588496",
      "postDate": "07/30/2019 16:54:19",
      "content": "<p>Thank you very much <a href=\"/cyberia\">@cyberia</a> <br>\nDeserves upvote!</p>",
      "rawMarkdown": "Thank you very much @cyberia  \nDeserves upvote!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 588496,
      "author_name": "muhakabartay",
      "author_url": "",
      "post_date": "07/30/2019 16:54:19",
      "content": "<p>Thank you very much <a href=\"/cyberia\">@cyberia</a> <br>\nDeserves upvote!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "586650": "I found an intuitive description of generative learning algorithms in this PDF from a course taught at Stanford. http://cs229.stanford.edu/notes/cs229-notes2.pdf \n\nFollowing is from the document:\nConsider a classification problem in which we want to learn to distinguish between elephants (y = 1) and dogs (y = 0), based on some features of an animal. Given a training set, an algorithm like logistic regression or the perceptron algorithm (basically) tries to find a straight line—that is, a decision boundary—that separates the elephants and dogs. Then, to classify a new animal as either an elephant or a dog, it checks on which side of the decision boundary it falls, and makes its prediction accordingly.\nHere’s a different approach. First, looking at elephants, we can build a model of what elephants look like. Then, looking at dogs, we can build a separate model of what dogs look like. Finally, to classify a new animal, we can match the new animal against the elephant model, and match it against the dog model, to see whether the new animal looks more like the elephants or more like the dogs we had seen in the training set.\nAlgorithms that try to learn p(y|x) directly (such as logistic regression), or algorithms that try to learn mappings directly from the space of inputs X to the labels {0, 1}, (such as the perceptron algorithm) are called discrim- inative learning algorithms. Here, we’ll talk about algorithms that instead try to model p(x|y) (and p(y)). These algorithms are called generative learning algorithms. For instance, if y indicates whether an example is a dog (0) or an elephant (1), then p(x|y = 0) models the distribution of dogs’ features, and p(x|y = 1) models the distribution of elephants’ features.\n\nIt also mentions Gaussian Discriminant Analysis (GDA).",
    "588496": "Thank you very much @cyberia  \nDeserves upvote!"
  },
  "source": "meta"
}