This repository contains Python code for building a linear regression model to predict brain weight based on head size. Linear regression is a simple and widely used machine learning algorithm for predicting a continuous variable based on one or more predictor variables.
The dataset used for training and testing the model includes measurements of head size (in cubic centimeters) and the corresponding brain weight (in grams). This dataset is commonly used for educational purposes and can be found in various statistical and machine learning resources.
Make sure you have the following dependencies installed:
- Python 3.x
- NumPy
- pandas
- scikit-learn
- matplotlib
- seaborn
You can install these dependencies using the following command:
pip install numpy pandas scikit-learn matplotlib seaborn
-
Clone the Repository:
git clone https://github.com/yourusername/brain-weight-prediction.git
-
Navigate to the Project Directory:
cd brain-weight-prediction
-
Run the linear_regression_brain_weight.py script:
python linear_regression_brain_weight.py
This script will load the dataset, preprocess the data, split it into training and testing sets, train the linear regression model, and evaluate its performance.