0% found this document useful (0 votes)
21 views

Training Python

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Training Python

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Supervised Machine Learning

• Supervised learning is where you have input variables (x) and an output
variable (Y) and you use an algorithm to learn the mapping function
from the input to the output. Example: Y = f(X)
• It can be further grouped into Regression and Classification problems.

Image source link is at reference section


Regression
A regression problem is when the output variable is a real value
Examples: Salary, Share’s price, Price

Image source link is at reference section


Regression concepts
iii. Model Building
i. Preprocessing i. Linear models
A. Identify ii. Logistic regression – Binary Response
a. Missing Data iii. Random Forest, XgBoost, CatBoost, SVM and many More
b. Collinearity More to
iv. Regularisation: Lasso vs ridge penalty
B. Data Preparation come
later…
a. Remove duplicates • It's a shrinkage towards zero using an absolute value (l1
b. Outliers treatment penalty) rather than a sum of squares(l2 penalty).
c. Transformation • Ridge uses l2 (sum of the squares of the coefficients) where
d. Feature Engineering as lasso go with l1 (sum of the absolute values of the
e. Interactions coefficients).
ii. Classic Feature Selection • Ridge - for small/medium sized effects features and Lasso –
• Forward Selection: Start with no feature in the model for few variables with a medium/large effect
and for each iteration, keep adding the feature which
best improves till no improvement in the performance of • In the ridge, the coefficients of the linear transformation are
the model is achieved. normal distributed and in the lasso they are Laplace
• Backward Elimination: Start with all the features and distributed
removes the least significant feature at each iteration • Ridge can't zero coefficients - either select all or none of
which improves the performance of the model.
them. Lasso does both parameter shrinkage and variable
• Recursive Feature elimination: A greedy optimization selection automatically because it zero out the co-efficients
algorithm which aims to find the best performing
feature subset. of collinear variables. Here it helps to select the variable(s)
3
Regression concepts cont

v. Residual Analysis
• No correlation between the residual
(error) terms
• How to check: Look for Durbin -
Watson (DW) statistic. It must lie
between 0 and 4. If DW = 2, implies
no autocorrelation, 0 < DW < 2
implies positive autocorrelation
while 2 < DW < 4 indicates negative
autocorrelation.
• No Heteroskedasticity (Homoscedasticity)
• If present then transform the
response variable such as log(Y) or
sqrt(Y) or BoxCox
• Normal Q-Q plot
4

You might also like