Skip to content

Built a Linear Regression model to predict housing prices using Python, Pandas, and scikit-learn. Includes preprocessing, model evaluation, and visualizations.

Notifications You must be signed in to change notification settings

Shashank911/Task-3-Linear-Regression-Housing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Task 3: Linear Regression - Housing Price Prediction

Objective

Build and evaluate a Linear Regression model to predict housing prices based on various independent features. This task demonstrates preprocessing, feature engineering, model training, evaluation, and result interpretation.

Dataset

ools & Libraries Used

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • scikit-learn

Workflow

  1. Data Loading: Imported the dataset using Pandas.
  2. Exploratory Analysis: Checked data types, missing values, and basic statistics.
  3. Preprocessing:
    • One-hot encoded categorical variables using get_dummies().
    • Split data into independent variables (X) and target variable (y).
  4. Train-Test Split: Used train_test_split to divide the data into 80% training and 20% testing sets.
  5. Model Building: Trained a Linear Regression model using LinearRegression() from scikit-learn.
  6. Evaluation:
    • MAE (Mean Absolute Error)
    • MSE (Mean Squared Error)
    • R² Score
  7. Visualization:
    • Scatter plot of Actual vs Predicted values
  8. Interpretation: Analyzed the coefficients of the trained model to understand feature impact.

Results

The model successfully predicted housing prices with a decent R² score and low error metrics. The output included coefficient values for each feature, indicating their influence on price prediction.

Files

  • task3_linear_regression.ipynb – Jupyter Notebook with full code and explanations
  • Housing.csv – Dataset used
  • README.md – Project documentation

Completed on

August 7, 2025

Acknowledgments

This task was completed as part of my AI/ML internship to practice real-world applications of regression techniques.

About

Built a Linear Regression model to predict housing prices using Python, Pandas, and scikit-learn. Includes preprocessing, model evaluation, and visualizations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published