Linear predictors

x-> f -> y

  • binary classification - y has two elements
  • Regression - y is R

    Types

  • multiclass classification

  • ranking
  • structured prediction

    Data

  • specifies (x, y)

  • traning data: what the function could do

    Framework

  • D_train -> learner -> f

  • x -> f -> y
  • general machine leaning
  • abstract

    Feature extraction

    whether a string is an email address?

  • feature extractor

    • output a set of (feature name, feature value) pairs
      • name is important
      • form a feature vector Machine Learning 1 - 图1
      • a weight vector Machine Learning 1 - 图2
      • Score Machine Learning 1 - 图3
      • Margin Machine Learning 1 - 图4 - how correct we are
    • arbitrary
  • linear classifier

    • Machine Learning 1 - 图5
    • decision boundary - zero
      • one side is positive
      • the other side is negative
      • 2d - line
      • 3d - plane

        Loss minimization

  • Loss functionMachine Learning 1 - 图6

    • output is usually a number
    • input could be high dimensional
  • Bianry classification loss function

    • Machine Learning 1 - 图7
    • margin - how correct you are
    • loss - how correct/wrong you are

      Linear regression

      Machine Learning 1 - 图8
  • residual

    • distance from predicted value and the true value
    • squared loss
    • Machine Learning 1 - 图9- not very large
    • Machine Learning 1 - 图10 - not smooth
  • Train loss

    • average loss of all the examples
    • one the entire training data set

      SGD

  • Least squares regression

    • TrainLoss
  • Gradient descent
    • calculus - chain rule TrainLoss
    • very slow
  • SGD - an optimization for GD
    • Pick up and update
    • step size
      • large - faster
      • small - precise - slow

Replacement of 0-1 loss function

  • Hinge loss
  • Logistic regression