分类:多类别分类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
多类别分类可被视为对二元分类的扩展,适用于两个以上的类别。如果每个示例只能分配到一个类,则可以将分类问题处理为二元分类问题,其中一个类包含多个类中的其中一个,另一个类包含所有其他类。然后,可以对每个原始类别重复此过程。
例如,在一个包含三个类别的多类分类问题中,您需要对标签为 A、B 和 C 的示例进行分类,您可以将该问题转换为两个单独的二元分类问题。首先,您可以创建一个二元分类器,使用标签 A+B 和标签 C 对示例进行分类。然后,您可以创建第二个二元分类器,使用标签 A 和标签 B 重新对标记为 A+B 的示例进行分类。
多类别问题的例子是手写分类器,它会获取手写数字的图像,并决定要代表哪个数字 0-9。
如果类成员资格不是排他的,也就是说,一个示例可以分配给多个类,这称为多标签分类问题。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-06。
[null,null,["最后更新时间 (UTC):2024-11-06。"],[[["\u003cp\u003eMulti-class classification extends binary classification to handle more than two classes, often by breaking the problem down into multiple binary classifications.\u003c/p\u003e\n"],["\u003cp\u003eIn multi-class classification, each example is assigned to only one class, like classifying handwritten digits (0-9).\u003c/p\u003e\n"],["\u003cp\u003eIf an example can belong to multiple classes, it's called multi-label classification, which is a distinct but related concept.\u003c/p\u003e\n"],["\u003cp\u003eMulti-class classification can be achieved by creating a series of binary classifiers, each distinguishing between a subset of classes.\u003c/p\u003e\n"]]],[],null,["# Classification: Multi-class classification\n\nMulti-class classification can be treated as an extension of\n[**binary classification**](/machine-learning/glossary#binary_classification)\nto more than two classes. If each example can only be\nassigned to one class, then the classification problem can be handled as a\nbinary classification problem, where one class contains one of the multiple\nclasses, and the other class contains all the other classes put together.\nThe process can then be repeated for each of the original classes.\n\nFor example, in a three-class multi-class classification problem,\nwhere you're classifying examples with the labels **A** , **B** , and\n**C** , you could turn the problem into two separate binary classification\nproblems. First, you might create a binary classifier that categorizes examples\nusing the label **A+B** and the label **C** . Then, you could create a second\nbinary classifier that reclassifies the examples that are labeled **A+B**\nusing the label **A** and the label **B**.\n\nAn example of a multi-class problem is a handwriting classifier that takes\nan image of a handwritten digit and decides which digit, 0-9, is represented.\n\nIf class membership isn't exclusive, which is to say, an example can be\nassigned to multiple classes, this is known as a *multi-label* classification\nproblem.\n| Multi-class classification is explored more deeply in the [Multi-class neural networks](/machine-learning/crash-course/neural-networks/multi-class) section of the [Neural Networks](/machine-learning/crash-course/neural-networks) module.\n| **Key terms:**\n|\n- [Binary classification](/machine-learning/glossary#binary_classification) \n[Help Center](https://support.google.com/machinelearningeducation)"]]