Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pundit4real/linear-regression-model
This repository contains code for two linear regression models: one predicts profit based on factors like R&D spend, administrative spend, marketing spend, and state; the other predicts exam scores based on study hours.
https://github.com/pundit4real/linear-regression-model
Last synced: 8 days ago
JSON representation
This repository contains code for two linear regression models: one predicts profit based on factors like R&D spend, administrative spend, marketing spend, and state; the other predicts exam scores based on study hours.
- Host: GitHub
- URL: https://github.com/pundit4real/linear-regression-model
- Owner: Pundit4Real
- Created: 2024-04-14T11:16:00.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-05-05T19:41:06.000Z (9 months ago)
- Last Synced: 2024-11-24T20:34:14.414Z (2 months ago)
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Linear Regression Models
This repository contains code for two linear regression models:
1. **Multiple Linear Regression Model for Profit Prediction**
2. **Linear Regression Model for Exam Score Prediction**## Prerequisites
- Python 3
- Jupyter Notebook or any Python IDE
- Create a virtual environment ( recommended )## Installation
1. Create a virtual environmentpython -m venv venv
2. Clone or download this repository to your local machine.https://github.com/Pundit4Real/Linear-Regression-model.git
3. Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
4. Install the required Python libraries using pip by running the command below:
pip install -r requirements.txt
5. Ensure you have the datasets '50_Startups.csv' and 'students_scores.csv' in the same directory as the code.
## Running the Models
1. Open a terminal or command prompt.2. Navigate to the directory containing the code files.
3. To run the Multiple Linear Regression Model for Profit Prediction:
- Run the script `multiple_linear_regression_profit.py` using Python:python multiple_linear_regression_profit.py
4. To run the Linear Regression Model for Exam Score Prediction:
- Run the script `linear_regression_exam_scores.py` using Python:
python linear_regression_exam_scores.py
5. Both scripts will train the respective models, make predictions, display evaluation metrics, and visualize the results.
## Customization
- You can modify the code to use your own datasets by replacing the provided dataset files.
- Experiment with different parameters and preprocessing techniques to improve model performance.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.