Topic 1: Loss functions Flashcards
What is a target
The output y of a function
What is the basic model of the function of sample
y = ftrue(x) + ϵ
ϵ = noise, modelled by a gaussian distribution
What is k-nn regression
When a new x value is observed, to calculate y
Take the k nearest neighbours to x and average their y values
What is an instance-based algorithm
Not good at generalising beyond the current scenario
i.e. k-nn
What is “fine-tuned” the same as
overfitting = complex
What are the 6 main types of function approximations
linear/polynomial regression
support vector machines
neural networks (CNN and logistic regression)
naive bayes (probabilistic models)
decision trees (for both regression and classification)
ensemble models
How do the 6 main types of function approximations work
By minimising loss functions
What are the properites of overfitting
high accuracy on training data
captures noise
high testing errors
What are the properties of underfitting
too simple
high training and testing errors
What does x ∈ R^d mean
x is a real-valued feature vector of length d
What is the common loss function used for classification problems
Cross entropy loss
What is the formula for binary CE loss
l(y, f(x)) = -[ylnf(x) + (1-y)ln(1-f(x))]
where y ∈ {0,1} and f(x) ∈ (0,1)
What is the common loss function used for regression problems
Squared loss function
What is the formula for squared loss function
l(y, f(x)) = (y - f(x))^2
Where does the true label y always go
First before the function label f(x)
eg ( y - f(x))