Week 1 Flashcards
(26 cards)
Definition of machine learning
when the program learns from experience E with respect to some class of tasks, T and has a measured performance P. and performance P improves with experience E
Define classification generically
input x provides some feature representation e.g. colour, shape etc. Output Y takes some values in the prescribed set {1,2,…,k}, where k is the number of classes. Some function f:R^d -> {1,..k} is constructed such that if object with features x in R^d belongs to class y then f(x)=y
Alternatively, construct a function that given features returns the probability of the features
Difference between unsupervised and supervised learning
unsupervised has only input features. supervised has input-output pairs
what are two approaches to measuring Performance P
-Accuracy: proportion of correctly classified examples i.e. the number of correctly classified examples divided by the total number of examples
-Residual: used for regression tasks, which is the difference between true output and predicted output
what are the 3 types of learning tasks?
supervised, unsupervised, reinforcment
describe supervised learning
we have a training dataset in terms of input-output pairs, output is the supervised information. We aim for our model to have predictions from inputs map to an output that is close to the true predicted output
describe unsupervised learning
we only have feature information. We aim to find a pattern/relationship among feature information whether by a partition of the data into different groups or an internal representation of the input (higher dimensional data to low dimensional data) so that the relationships between examples are preserved
Reinforcement learning
a learning task where we want to interact with the environment. we aim to maximize some reward function/ minimise loss function
what are two common tasks in supervised learning and define their use cases
Classification: used to predict discrete values
Regression: used to predict continuous values
what are two common tasks in unsupervised learning and define their use cases
Clustering: the algorithm tries to detect similar groups using some similarity measure to quantify the similarity. we aim to find a partition of the training dataset into different groups. examples within the same group are similar under the similarity measure, examples from other groups are dissimilar
Dimensionality Reduction: simplifies data without loosing too much information,
what are two common tasks in unsupervised learning and define their use cases?
Clustering: the algorithm tries to detect similar groups using some similarity measure to quantify the similarity. we aim to find a partition of the training dataset into different groups. examples within the same group are similar under the similarity measure, examples from other groups are dissimilar
Dimensionality Reduction: simplifies data without losing too much information. an example may have many features only some of which are actually important to learning. Dimensionality reduction aims to transform the original features into some few features whilst keeping as much information as possible
Give a slightly more thorough account of reinforcement learning
The agent interacts with the environment:
For each Time Step:
-Agent receives observations (e.g. (x,y)), which give it information about the state
-Agent chooses the action that affects the state
Agent periodically receives a reward
Agent wants to learn a policy or mapping from observations to action which maximises the average rewards over time
give a simple account of a reinforcement learning example
Consider an agent in a maze
-agent observes location (x,y) which is a tate
-the agent can take action by moving north, south, west or east
-after taking the aforementioned action, the agent’s new state is e.g. (x+1,y)
-the environment will give the agent feedback in terms of reward, in this example the reward may be -1 per step since we want to escape the maze asap
-Agent chooses her action according to a policy, the policy is a map from state to action, agent learns this policy to obtain maximum rewards over time
what are the components to an agents actions in reinforcement learning
Agent (Z) -> Action (a_t) , Environment, Reward (r_t) and State (S_t), back to agent
how are correct incorrect guesses of a function represented
classification, y in {-1,+1},
regression, y in set of real numbers
what arguments do loss functions take
model prediction value
actual value
if someone says because the model performs well on training data it can be deployed, why are they a numpty?
Training data is subject to overfitting and training a model on just a particular instance of the data does not constitute an accurate model. The model must first be put through testing and validation before it is deployed
What is the formal definition of training error
Err_train(f)= (1/n) * Sum(of n elements)(Loss(f(x^(i)-y^(i))^2
Loss function could be: Loss( f( x^(i) ), y^(i) ) = f( x^(i) ) - y^(i) )^2
What is the formal definition of testing error
Err_test(f) - Err_traing(f) + Err_test (f) - Err_train (f)
Err_test(f) - Err_train(f) can be generalised as Gen_gap(f)
what is the generalization gap and what value is it typically greater than and why
The generalization gap is the difference between the test error and the training error
it is typically larger than 0 as the model is trained on the training dataset and therefore can achieve a small training error,
how do under-fitted / overfitted models perform on test vs training data
-underfitted, training poor and test is poor
-overfitted, training good test is poor
describe underfit, overfit and optimum curve representations of training models
what does overfitting mean in plain words
model performs well on training data but does not generalize well to tet data, this happens when model is too complex for the amount of data
describe the relationship between test and training error as a function of model complexity