Multiclass Classification

noun

say it: “MUL-tee-klas klas-uh-fih-KAY-shun” /ˈmʌltiˌklæs ˌklæsəfɪˈkeɪʃən/

Sorting examples into one of three or more categories.

What is multiclass classification?

Multiclass classification is classification with three or more possible answers, such as apple, orange or pear, where each example gets exactly one. scikit-learn's classifiers handle it with no extra code: give them labels with more than two values.

from sklearn.tree import DecisionTreeClassifier
fruit = [[120], [130], [160], [170], [200], [210]]   # grams
names = ["apple", "apple", "pear", "pear", "orange", "orange"]
model = DecisionTreeClassifier().fit(fruit, names)
print(model.classes_)   # ['apple' 'orange' 'pear']

In a sentence

  • “In multiclass classification, every example still gets only one answer.”
  • “Sorting fruit into apples, oranges and pears is multiclass classification.”

Level: Journeyman · More AI Basics terms at this level

Updated