AI LAB PROGRAMS MTECH
AI LAB PROGRAMS MTECH
Linear Regression is a statistical method used to predict the value of a continuous target
variable based on one or more independent variables. A simple linear regression predicts the
target variable using one independent variable.
The relationship is modeled as:
y=mx+c
Where:
• y is the target variable (output)
• x is the input variable (feature)
• m is the slope (coefficient)
• c is the y-intercept
The objective is to find the values of mmm and ccc that minimize the error (difference)
between the predicted values (y^) and actual values.
Sample Dataset:
We will use a simple dataset for predicting a student's score based on the number of hours
studied:
Hours Studied Score
1 50
2 55
3 65
4 70
5 75
6 85
7 95
Output: