This is a simple machine learning model that predicts student scores based on the number of hours studied, using Linear Regression.
predictor.py– Python script that loads data, trains the model, and plots results.data.csv– Dataset containing hours studied and scores.requirements.txt– Python dependencies.
- Loads the dataset using pandas.
- Splits the data into training and test sets.
- Trains a Linear Regression model.
- Predicts test values.
- Plots actual vs predicted scores.
pandasmatplotlibscikit-learn
Actual Predicted
4 35.81
9 28.21
27 33.00