Lably
Skip to content

Linear classifier

Statistical classification in machine learning

  • 4 min read
  • 2 chapters

Related on Lably

Through Machine learning, Linear combination and Real number

Definition

If the input feature vector to the classifier is a real vector x→, then the output score is

y=f(w→⋅x→)=f(∑jwjxj),

where w→ is a real vector of weights and f is a function that converts the dot product of the two vectors into the desired output. (In other words, w→ is a one-form or linear functional mapping x→ onto R.) The weight vector w→ is learned from a set of labeled training samples. Often f is a threshold function, which maps all values of w→⋅x→ above a certain threshold to the first class and all other values to the second class; e.g.,

f(x)={1if wT⋅x>θ,0otherwise

The superscript T indicates the transpose and θ is a scalar threshold. A more complex f might give the probability that an item belongs to a certain class.

For a two-class classification problem, one can visualize the operation of a linear classifier as splitting a high-dimensional input space with a hyperplane: all points on one side of the hyperplane are classified as "yes", while the others are classified as "no".

A linear classifier is often used in situations where the speed of classification is an issue, since it is often the fastest classifier, especially when x→ is sparse. Also, linear classifiers often work very well when the number of dimensions in x→ is large, as in document classification, where each element in x→ is typically the number of occurrences of a word in a document (see document-term matrix). In such cases, the classifier should be well-regularized.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Robotics