UNIVARIATE LINEAR REGRESSION - MACHINE LEARNING
git clone https://github.com/CO18325/UNIVARIATE-LINEAR-REGRESSION.git
pip install numpy
pip install pandas
pip install matplotlib
pip install seaborn
python script.py
Linear Regression is a supervised machine learning algorithm where the predicted output is continuous and has a constant slope. Linear regression is used for finding linear relationship between target and one or more predictors. It’s used to predict values within a continuous range, (e.g. sales, price) rather than trying to classify them into categories (e.g. cat, dog).
The core idea is to obtain a line that best fits the data. The best fit line is the one for which total prediction error (all data points) are as small as possible. Error is the distance between the point to the regression line.
This project is on Linear Regression Model of Machine Learning. It is built completely from scratch ie no library which consists of pre-defined Machine Learning models such as scdfdsfs is used. In this model we used Gradient Descent to optimize the Cost Function. Core language is Python. This model is build in the form of a complete end-to-end program rather than a model on Jupyter Notebook
We have a dataset of manufacturing company. The dataset consists of two colummns:
Thus, we need to find the relation of profit of the company and the population of the city. Thus, after finding the optimal relation we can predict the profits for various unknown cities based on the knowledge of their population.