Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Machine Learning

Rating
-
Sold
-
Pages
41
Uploaded on
11-06-2021
Written in
2020/2021

Summary Machine Learning, Tilburg University, 2021

Institution
Course

Content preview

Machine learning
Machine Learning is the study of computer algorithms that improve automatically through
experience (involves becoming better at a task T based on some experience E with respect to some
performance measure P). So, the computer learns from its mistakes. It gets better all the time.
For example, steps in flagging spam:
1. You find examples of SPAM and non-SPAM (training set)
2. Come up with a learning algorithm
3. A learning algorithm infers rules from examples  for example, certain words
4. These rules can then be applied to new and unseen data (test set)  this is very important
for generalization. Our goal is to make the algorithm useful for new e-mails, we do not care
AT ALL about the e-mails in the training data. We want to algorithm that most correctly
classifies NEW data.
Examples of machine learning:
- Flagging spam e-mails
- Flagging suspicious credit card transactions
- Recommend books based on earlier purchases (from both the individual and other people)
- Recognize and label names of people’s organization’s names in text


In machine learning, you follow the following steps:
1. Define a ML problem and propose a solution. So you define classification/regression,
supervised/unsupervised, expected outcome and measures to evaluate performance.
2. Construct your dataset. So collect and clean raw data, and then split the data.
3. Use feature engineering, so think about how you will represent the data.
4. Train a model, so optimize parameters and minimize the loss function.
5. Use the trained model to make predictions, so evaluate the performance of your model.


Feature extraction
Feature extraction refers to the process of transforming raw data into numerical features that can
be processed while preserving the information in the original data set. So basically you create new
features because the existing features are not informative. It can be accomplished manually or
automatically. So you update your existing features or create new ones.
Manually: requires identifying and describing the features that are relevant for a given problem and
implementing a way to extract those features. (you define meaningful features)

,Automatically: uses specialized algorithms or deep networks to extract features automatically from
signals or images without the need for human intervention. (meaningful features are extracted
within the algorithm).


Feature selection
In contrast to feature extraction, you do not update/create new features, but you simply select
features you already have. This will reduce the dimensionality of your dataset; it will become
smaller. If features are noisy, or if they are redundant, you should just delete them.
Advantages:
- Simplified models
- Shorter training times
- Potentially improved performance (irrelevant features may hurt the performance, for
example if two features are both important but they are highly correlated)
- Reducing overfitting


Binary classification
Type of learning problem. With binary classification, we want to find yes/no, positive/negative,
etcetera. For instance, finding out whether an e-mail is spam or not.


Multilabel classification
Type of learning problem. This is similar to binary classification, but instead of two classes, there are
multiple classes to choose from. The response is a finite set of yes/no.


Regression
Type of learning problem. With regression, we want to find a real number (predict people’s age,
predict sales, etc)


Ranking
Type of learning problem. With ranking, we want to order objects according to their relevance. For
instance, google pages are ranked from most relevant to least relevant. You will probably never view
the least relevant ones.

,Sequence labeling
Type of learning problem. With sequence labeling, the input is a sequence of elements (for instance,
words). The response is a corresponding sequence of labels.


Sequence-to-sequence modeling
Type of learning problem. Similar to sequence labeling, but with sequence-to-sequence modeling,
the response is another sequence of elements (for example, different lengths or different sources).


Autonomous behavior
Type of learning problem. With autonomous behavior, the inputs can be about everything. The idea
is that the object learns form itself. For example, a self-driving car gives measurements from sensors
etcetera as input and instructions for self-driving as response.


Evaluation metrics
- MSE: evaluation metric, this is the mean squared error (y_pred – y_true). You use the MSE
instead of the MAE when you want to punish for high errors (outliers).




- MAE: evaluation metric, this is the mean absolute error (y_pred – y_true).




- Error rate: this is the opposite of accuracy (TP+TN / all), which is FP + FN / all. So basically
this indicates the score of wrong classifications.




Accuracy/Recall/Precision/F score
These evaluation metrics focus on a specific king of mistake.
Accuracy = (TP + TN) / all

, Precision = TP / (TP + FP)
Recall = TP / (TP + FN). You use this when a FN is much worse than a FP, for example with corona.
F score: you use this with unbalanced classes. It is the harmonic mean between recall and precision.
With the beta, you can specify how many times you care more about recall than about precision.
The standard is beta = 1 (F1 score), meaning that you value recall and precision equally.




Macro-average/Micro-average
Macro-average = compute precision and recap per-class, and average. Rare classes have the same
impact as frequent classes. Macro-average is the total precision/recall etc.
Micro-average = treat each correct prediction as TP, each missing classification as FN and each
incorrect prediction as FP. Micro-averaging is used in single-label classification. We average over all
classes, including the null/default class (so precision = recall = F score = accuracy). Micro-average is
the precision/recall etc. per class.


Decision tree
A decision tree is a supervised learning method. Trees are recursively defined data structures. There
is a base case (leaf node) and recursive cases (branch nodes). You should start with the question that
eliminates most options, so choose the question that if we had to classify data based only on one
question, which question would do best? A tree consists of:
- Nodes: check the value of a feature
- Edges: correspond to value of a test, connects to next node or leaf
- Leaves: terminal nodes that predict the outcome
With more features, the number of possible trees grows exponentially. We cannot just check them
all and see which one works best.


A full binary tree is a tree in which every node other than the leaves has two children. If all examples
have the same label, we create a leaf node with this label. Otherwise, we choose the most important
question and split the data into two parts (yes or no). We remove the question we have already
asked from the question set.

Written for

Institution
Study
Course

Document information

Uploaded on
June 11, 2021
Number of pages
41
Written in
2020/2021
Type
SUMMARY

Subjects

$7.17
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
tessaroes1

Get to know the seller

Seller avatar
tessaroes1 Tilburg University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions