1
By Mostafa Mohammadi
Training Models
Chapter 4
2
Contents
3
Types of Learning
Supervised Learning
Involves training a model on labeled data, where the input-output pairs are known. The model learns to predict the output from the input data.
Unsupervised Learning
Uses unlabeled data, allowing the model to identify patterns and relationships within the data without predefined labels.
Semi-supervised Learning
Combines a small amount of labeled data with a large amount of unlabeled data during training.
4
Supervised Learning
Where the objective is to predict a discrete class label for given input features. The model learns to categorize the input data into predefined classes or groups.
Classification
The goal is to predict a continuous output variable based on one or more input features. The model learns the relationship between the inputs and the continuous output.
Regression
5
Regression
Calculating the behavior of Y variable based on X variables
Prediction based on data for future samples
Estimating the relative importance of each independent variable in predicting the dependent variable
01
02
03
6
Why Linear Regression?
What is Linear Regression?
7
What is Linear Regression?
Simple Linear Regression
Multiple Linear Regression
8
Linear Regression Assumption
9
Linear Regression
So how it learns? 🤔🤔
Learning here means finding the best parameters which fits a line with least error.
10
Normal Equation
11
Gradient descent
Gradient descent is a generic optimization algorithm capable of finding optimal solutions to a wide range of problems. The general idea of gradient descent is to tweak
parameters iteratively in order to minimize a cost function.
12
Learning Rate
13
How GD works in Linear Regression
14
Thanks for attention
t.me/Mostafa_mhammadi
in/mostafamhammadi/