Professional Documents
Culture Documents
Error
Example: -
Consider the following data: -
x 2 4 3 6 8 8 10
y 10 9 6 6 6 3 2
Now, we start plotting our best fit line for following example: -
Step-1: - Calculate the Mean values
(2 + 4 + 3 + 6 + 8 + 8 + 10) 41
𝑥̅ = = = 5.86
7 7
(10 + 9 + 6 + 6 + 6 + 3 + 2) 42
𝑌= = =6
7 7
Step-2: - Calculate the slope of line
Best-Fit Line
12
0, 10.86
10 2, 10
4, 9
8
Dependent Axis
6 3, 6 6, 6 8, 6
4
8, 3
2 10, 2
0 13.1, 0
0 2 4 6 8 10 12 14
-2
Independent Axis
Pros: -
1. Simple to implement.
2. Used to predict numeric values
Cons: -
1. Prone to overfitting
2. Cannot used it when the relation between x & y variables are non-linear
Logistic Regression: -
Function is also called as sigmoidal function and it draw s-shaped curve sigmoid curve
and it was firstly when scientist got a problem for modelling population growth.
f(x) =
LR passes the input through the f(x) but after it treats the result in terms of probability.
Iris Flower dataset.