100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary Machine Learning $5.98   Add to cart

Summary

Summary Machine Learning

 32 views  0 purchase
  • Course
  • Institution

Summary Machine Learning, Tilburg University, 2021

Preview 4 out of 41  pages

  • June 11, 2021
  • 41
  • 2020/2021
  • Summary
avatar-seller
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.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller tessaroes1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.98. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75759 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.98
  • (0)
  Add to cart