Department of Collegiate and Technical Education
Artificial Intelligence and Machine Learning
( V Semester)
WEEK-6 Session-3
Model Training
Course Code: 20CS51I
Computer Science and Engineering
What we learned in previous session?
• Model Training
• Supervised Learning: Regression
• Regularization in ML
• Real-Life Applications
• Linear Regression
• Simple Linear Regression
• Multiple Linear Regression
• Polynomial Linear Regression
• Applications of Linear Regression
Computer Science & Engineering –20CS51I
Learning Outcome
• Understanding Simple linear regression
• Assumptions of Linear Regression
• Gradient Descent Algorithm
• Student Score Based On Study Hours
• To Analyses The Relation Between CIE And SEE Result Evaluation
• To Analyze Relation Between Crop Yield And Rainfall Rate
Computer Science & Engineering –20CS51I
Understanding Simple Linear Regression
– A linear regression model attempts to explain the relationship between a
dependent (output variables) variable and one or more independent
(predictor variable) variables using a straight line.
• This straight line is represented using the following formula:
• y = mx +c
• Where, y: dependent variable
• x: independent variable
• m: Slope of the line (For a unit increase in the quantity of X, Y
increases by m.1 = m units.)
• c: y intercept (The value of Y is c when the value of X is 0)
Assumptions of Linear Regression
• The Independent variables should be linearly related to the dependent variables.
• Every feature in the data is Normally Distributed.
• There should be little or no multi-collinearity in the data.
• The mean of the residual is zero.
• Residuals obatined should be normally distributed.
• Variance of the residual throughout the data should be same. This is known as homoscedasticity.
• There should be little or no Auto-Correlation is the data.
Gradient Descent Algorithm
• Gradient Descent is an algorithm that finds the best-fit line for a given training
dataset in a smaller number of iterations.
• If we plot m and c against MSE, it will acquire a bowl shape
Student Score Based On Study Hours
Student Score Based On Study Hours
To Analyses The Relation Between CIE And SEE Result
1) Splitting the Data
2) Fitting the Data into the model
3) Predicting the Percentage of Marks
4) Comparing the Predicted Marks with the Actual Marks
5) Visually Comparing the Predicted Marks with the Actual Marks
6) Evaluating the Model
To Analyze Relation Between Crop Yield And Rainfall Rate
THANK YOU
Content Developers
Ashok Hullur.
Lecturer, 119 - Government Polytechnic for Women,
Department of Computer Science Bengaluru
and Engineering
Bhavani H R.
Lecturer, 119 - Government Polytechnic for Women,
Department of Computer Science Bengaluru ( 331- Al-Khateeb (Govt Aided)
and Engineering Polytechnic Bengaluru)