This project implements a Linear Regression model to predict a person’s height based on their weight using a simple height–weight dataset.
- Input Feature: Weight
- Target Variable: Height
- Algorithm Used: Linear Regression
- Language: Python
- Libraries: NumPy, Pandas, Matplotlib, Seaborn, Scikit-learn
The dataset contains two columns:
Weight– Weight of the personHeight– Height of the person
The data is used to learn a linear relationship between weight and height.
- Load and explore the dataset
- Visualize the relationship using a scatter plot
- Split data into training and testing sets
- Train a Linear Regression model
- Make height predictions
- Cross-Validation and Residual Analysis
- Evaluate model performance
A scatter plot is used to show the correlation between weight and height, along with the regression line for better understanding.
- Clone the repository
- Install required libraries:
pip install numpy pandas matplotlib scikit-learn seaborn