From dc23e3ff5caa4bfaff382d4a4b500c3e1d790940 Mon Sep 17 00:00:00 2001 From: ankitadona Date: Wed, 1 Apr 2026 15:46:14 +0530 Subject: [PATCH 1/2] student performances prediction using ML --- MLpython | 38 ++++++++++++++++++++++++++++++++++++++ MLpython.py | 38 ++++++++++++++++++++++++++++++++++++++ dataset.csv | 8 ++++++++ 3 files changed, 84 insertions(+) create mode 100644 MLpython create mode 100644 MLpython.py create mode 100644 dataset.csv diff --git a/MLpython b/MLpython new file mode 100644 index 0000000..c1bd9a1 --- /dev/null +++ b/MLpython @@ -0,0 +1,38 @@ +import pandas as pd +import matplotlib.pyplot as plt +from sklearn.linear_model import LinearRegression + +# Load dataset +data = pd.read_csv("dataset.csv") + +X = data[['hours_study','sleep_hours','attendance']] +y = data['marks'] + +# Train model +model = LinearRegression() +model.fit(X, y) + +print("=== AI Study Companion ===") +hours = float(input("Enter study hours: ")) +sleep = float(input("Enter sleep hours: ")) +attendance = float(input("Enter attendance %: ")) + +# Prediction +prediction = model.predict([[hours, sleep, attendance]])[0] + +print(f"\n Predicted Marks: {prediction:.2f}") + +# Smart Suggestions +if prediction < 50: + print("You need serious improvement. Increase study hours!") +elif prediction < 75: + print("You're doing okay. Stay consistent!") +else: + print("Excellent! Keep it up!") + +# Graph +plt.scatter(data['hours_study'], data['marks']) +plt.xlabel("Study Hours") +plt.ylabel("Marks") +plt.title("Study Hours vs Marks") +plt.show() \ No newline at end of file diff --git a/MLpython.py b/MLpython.py new file mode 100644 index 0000000..c1bd9a1 --- /dev/null +++ b/MLpython.py @@ -0,0 +1,38 @@ +import pandas as pd +import matplotlib.pyplot as plt +from sklearn.linear_model import LinearRegression + +# Load dataset +data = pd.read_csv("dataset.csv") + +X = data[['hours_study','sleep_hours','attendance']] +y = data['marks'] + +# Train model +model = LinearRegression() +model.fit(X, y) + +print("=== AI Study Companion ===") +hours = float(input("Enter study hours: ")) +sleep = float(input("Enter sleep hours: ")) +attendance = float(input("Enter attendance %: ")) + +# Prediction +prediction = model.predict([[hours, sleep, attendance]])[0] + +print(f"\n Predicted Marks: {prediction:.2f}") + +# Smart Suggestions +if prediction < 50: + print("You need serious improvement. Increase study hours!") +elif prediction < 75: + print("You're doing okay. Stay consistent!") +else: + print("Excellent! Keep it up!") + +# Graph +plt.scatter(data['hours_study'], data['marks']) +plt.xlabel("Study Hours") +plt.ylabel("Marks") +plt.title("Study Hours vs Marks") +plt.show() \ No newline at end of file diff --git a/dataset.csv b/dataset.csv new file mode 100644 index 0000000..360bf07 --- /dev/null +++ b/dataset.csv @@ -0,0 +1,8 @@ +hours_study,sleep_hours,attendance,marks +2,6,60,50 +3,7,65,55 +4,6,70,60 +5,7,75,65 +6,8,80,70 +7,7,85,75 +8,8,90,85 \ No newline at end of file From 4d7e31a70ed6d1dc36494ba1262bdb8499096503 Mon Sep 17 00:00:00 2001 From: ankitadona Date: Wed, 1 Apr 2026 15:55:51 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 9841612..3d5bc89 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ +# My Project: Student Performance Predictor + +This project predicts student marks using Machine Learning. + +## Features +- Predict marks using: + - Study hours + - Sleep hours + - Attendance +- Smart suggestions +- Graph visualization + +## Tech Stack +- Python +- Pandas +- Scikit-learn +- Matplotlib + +## Files +- MLpython.py +- dataset.csv + + ## 500 + 𝗔𝗿𝘁𝗶𝗳𝗶𝗰𝗶𝗮𝗹 𝗜𝗻𝘁𝗲𝗹𝗹𝗶𝗴𝗲𝗻𝗰𝗲 𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗟𝗶𝘀𝘁 𝘄𝗶𝘁𝗵 𝗰𝗼𝗱𝗲 ***500 AI Machine learning Deep learning Computer vision NLP Projects with code* !!!**