Week 3 Lecture 2
Linear Classification
(Affine) linear function
Note that the Solid contour line (where ) is linear as well.
is the orthogonal projection of to the contour line (plane or stg on higher dimensions)
Distance from the plane:
Note: signed distance
Decision functions
Typical classification between at least two label classes.
One approach is the βdiscriminant functionsβ
Weβll have as usual
We have a fun modified function:
Division by zero is only possible if the event is immesurable.
vs :
Input space () can be continous, while the label space () is discrete
is a probability distribution
Joint probailities
see the slides
left of the line is one class, other is to the left
The coloured areas are point of possible error
Sweet spot is their intersection
By moving the line up until the sweet spot, we can see that the error decreases. (Red area is gone)
Logistic regression
Logistic function Fermi function standard sigmoid
Goal is (for two-point distribution):
For labels , we have Bernouli.
..because the sigmoid does the casing for
Example for diverging algorithm for finding a classification function with ever higher confidence:
Logistinc regression
- For every step, you calculate a sum of all datapoints.
- Mini-batch only takes a random subset (introducing some noise/uncertainty); one can take smaller steps to compensate that.
- Also, you can do the stochastic descent so you only take random points, und update the parameter until you meet the criteria.
Polinomial embedding:
You transform the data, so you can fit a function that separate the data points. (See the slides)
The slide first shows a higher dimensional representation so we can see the points being separate by adding an extra parameter (using )
Later this parameter can be the transformation on the input so we arrive in the original dimensions.
Perceptron Learning and Margins
Larger distance to the decision boundary (margin) can withstand a bigger noise. (making it more robust). Margin should be measured in relation to the input data. (βcos changing the scale may show a βbiggerβ margin with the same performance)
The algorithm checks for misclassification (margin is negative :o).
Intuitively, if the point is misclassified, we add the vector to the boundaryβs normal, and if we repeat this method, weβll converge to a boundary where no errors are present. (Again, given that the two groups are separable)
This algorithm should terminate in steps.
where
And we assume there is a that
Proof:
He jsut drops the parf of the vector product, so the inequality holds (in one of the steps).
Summary
- Great method, βcos it does not tend to overfitting.
- Very linear, may need non-linear transformation to compensate
- Good for βBig Dataβ