摘要: 本文是吴恩达 (Andrew Ng)老师《机器学习》课程,第七章《logistic回归》中第52课时《多分类》的视频原文字幕。为本人在视频学习过程中记录下来并加以修正,使其更加简洁,方便阅读,以便日后查阅使用。现分享给大家。如有错误,欢迎大家批评指正,在此表示诚挚地感谢!同时希望对大家的学习能有所帮助。
In this video, we’ll talk about how to get logistic regression to work for multi-class classification problems, and in particular, I want to tell you about an algorithm called one-versus-all classification.
What’s a multi-class classification problem? Here are some examples. Let’s say you want a learning algorithm to automatically put your email into different folders, or to automatically tag your emails. So, you might have different folders or different tags for work email, email from your friends, email from your family, and emails about your hobby. And so, here we have a classification problem with 4 classes, which we might assign the numbers, the classes y=1, y=2, y=3 and y=4 too. And another example for a medical diagnosis: if a patient comes into your office with maybe a stuffy nose, the possible diagnoses could be that they’re not ill, maybe that’s y=1; or they have a cold, 2; or they have the flu, 3. And the 3rd and final example, if you are using machine learning to classify the weather, you know, maybe you want to decide the weather is sunny, cloudy, rainy or snow, or if there’s gonna b