NISHEETA THAKUR
121A1114-D2
EXPERIMENT – 1
AIM: To implement simple linear regression in Python.
THEORY:
Machine Learning is a branch of Artificial intelligence that focuses on the development of
algorithms and statistical models that can learn from and make predictions on data. Linear
regression is also a type of machine-learning algorithm, more specifically a supervised machine-
learning algorithm that learns from the labelled datasets and maps the data points to the most
optimized linear functions. which can be used for prediction on new datasets.
Linear regression is a type of supervised machine learning algorithm that computes the linear
relationship between the dependent variable and one or more independent features by fitting
a linear equation to observed data.
When there is only one independent feature, it is known as Simple Linear Regression, and when
there is more than one feature, it is known as Multiple Linear Regression.
Similarly, when there is only one dependent variable, it is considered Univariate Linear
Regression, while when there is more than one dependent variable, it is known as Multivariate
Regression.
Simple Linear Regression
This is the simplest form of linear regression, and it involves only one independent variable and
𝑦=𝛽0+𝛽1𝑋
one dependent variable. The equation for simple linear regression is:
where:
Y is the dependent variable
X is the independent variable
β0 is the intercept
β1 is the slope
Code: -
Screenshots : -
Conclusion: -
Hence Simple Linear Regression was implemented using Python .