Skip to content

meghasv09/LinearRegression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Univariate Linear Regression

Overview

This project implements Univariate Linear Regression to predict revenue based on population size. The dataset consists of:

  • Population size (in 10,000s)
  • Revenue (in $10,000s)

A Linear Regression model is trained to predict revenue based on the given population size. The implementation is written in Python and includes visualization of the results.


Visualizations

Linear Regression Model

The trained model fitting the dataset:
Linear Regression


Contour Plot

The contour plot visualizes how the cost function behaves for different values of model parameters. The global minimum represents the optimal values of (\theta_0) and (\theta_1):
Contour Plot


Cost Function

The cost function curve shows how the error decreases as training progresses:
Cost function


Installation & Setup

To run the project locally:

  1. Clone the repository:
    git clone https://github.com/meghasv09/LinearRegression.git
    cd LinearRegression
  2. Run the script:
    python linear_regression.py

About

Univariate Linear Regression model to predict revenue based on population size, implemented in Python with visualisation of results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages