Part 1 : Deterministic Data Models Flashcards
Data to Model
- Models are descriptions of the data, they encode our assumptions
- Models are a ‘generalisation’ of the data
Choice of model
Often dictated by practicality of method, as well as our assumptions of the data - No need to play God
A model aims to achieve
maximum discrimination
Linear Classifier
Only one parameter needed
Deterministic Models
produce an output without a confidence measure
- (Do not encode uncertainty in the data)
(Deterministic Model) - Line Fitting
The best fitting line is that which minimises a distance measure from the points to the line. Can use the Method of Least Squares
Method of Least-Squares
R(a, b) = Σ(yi − (a + bxi))2 - (This is known as the residual) aLS = y¯ − bLSx¯ bLS = Σ (xiyi − Nx¯y¯ / xi^2− Nx¯^2 ) Note :: x¯,y¯ <= mean x,y
Method :
- Minimise residual by taking the partial derivatives, and setting them to zero. (using the chain rule)
- Find aLS and bLS
- y = aLS(x) + bLS
(Method of Least-Squares) - Outliers
Have a disproportionate effect, because residual is defined in terms of squares differences
(Method of Least-Squares) - Matrix Form
R(a, b) =(also)= ||y − Xa||^2 where.. y = column matrix y1...yn X = column matrix, first column, 1, second column, x1...xn a = [a b]
y - Xa = [y1 -a - bx1
…. -a - ……
yn -a - bxn]
[aLS
bLS] = (((X^T)X)^-1)(X^T)y
…Look at slide 103
K-D Least Squares - Matrix Form
[aLS
bLS] = (((X^T)X)^-1)(X^T)y
Where ((X^T)X) is a (K+1)(K+1) square matrix
General Least Square - Matrix Form
Matrix formulation also allows least squares method to be extended to polynomial fitting.
For a polynomial of degree p + 1
yi = a0 + a1xi + a2xi^2 + …+ apxi^p
[aLS
bLS] = (((X^T)X)^-1)(X^T)y
Where ((X^T)X) is a (P+1)(P+1) square matrix
Generalistation and overfitting - Least Square, Polynomial Lines
Think of how lines of different order polynomials have different shapes…. order of p has a big impact on the separation of data.
See slide 108