Skip to content

Commit 8594e87

Browse files
Merge pull request #22 from faizanrajpoot774-debug/AIC
Add project AIC.
2 parents 42a4ed6 + fcfc53a commit 8594e87

38 files changed

Lines changed: 4003 additions & 0 deletions

ai_academic_fixed/README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# AcadAI — AI Academic Performance Prediction & Career Guidance System
2+
3+
**A professional AI-powered desktop application that predicts student GPA, detects weak subjects, recommends careers, and generates personalized study plans — built as a 4th Semester BSAI Project.**
4+
5+
---
6+
7+
## Project Info
8+
9+
**Subject:** Artificial Intelligence
10+
**Semester:** 4th
11+
**Submitted To:** [Dr. Muhammad Siddique](mailto:msiddique@nfciet.edu.pk)
12+
13+
**Members:**
14+
15+
- [Faizan Ishfaq](https://github.com/faizanrajpoot774-debug)
16+
- [Muawiya Amir](https://github.com/Muawiya-contact)
17+
18+
---
19+
20+
## Overview
21+
22+
**AcadAI** is an intelligent academic analytics platform built for university students. It uses Machine Learning to predict future GPA, detect at-risk students, recommend career paths based on academic profile, and generate AI-powered study plans — all inside a clean, professional desktop GUI.
23+
24+
Built with Python · PyQt5 · scikit-learn · SQLite · Matplotlib
25+
26+
---
27+
28+
## Features
29+
30+
| Feature | Description |
31+
| ---------------------- | ------------------------------------------------------------------------------------- |
32+
| GPA Prediction | Random Forest + Ridge Regression model predicts next semester GPA with ~91% accuracy |
33+
| Weak Subject Detection | ML model identifies subjects needing attention and suggests improvement strategies |
34+
| Career Recommendation | Matches student profile (GPA + skills + interests) to best-fit career paths |
35+
| Skill Roadmap | Personalized step-by-step learning roadmap for chosen career goal |
36+
| Study Planner | Generates weekly study schedules prioritizing weak subjects |
37+
| AI Chatbot 🤖 | NLP-based academic assistant that reads live database and answers student queries |
38+
| Analytics Dashboard | Interactive charts: GPA trends, subject radar, risk distribution, attendance analysis |
39+
| Student Management | Add, edit, import students via CSV — full CRUD with SQLite backend |
40+
| CSV Import/Export | Bulk import 60+ students from CSV; export reports |
41+
42+
---
43+
44+
## Installation
45+
46+
### Prerequisites
47+
48+
Make sure you have **Python 3.10+** installed:
49+
50+
```bash
51+
python --version
52+
```
53+
54+
### Step 1 — Clone the Repository
55+
56+
```bash
57+
git clone https://github.com/your-username/acadai.git
58+
cd acadAI
59+
```
60+
61+
### Step 2 — Install Dependencies
62+
63+
```bash
64+
pip install -r requirements.txt
65+
```
66+
67+
### Step 3 — Generate Sample Dataset (First Time Only)
68+
69+
```bash
70+
python generate_dataset.py
71+
```
72+
73+
This creates `datasets/student_data.csv` with 60 realistic student records.
74+
75+
### Step 4 — Run the Application
76+
77+
```bash
78+
python main.py
79+
```
80+
81+
---
82+
83+
## Requirements
84+
85+
```batch
86+
PyQt5>=5.15.0
87+
matplotlib>=3.7.0
88+
scikit-learn>=1.3.0
89+
pandas>=2.0.0
90+
numpy>=1.24.0
91+
```
92+
93+
Install all at once:
94+
95+
```bash
96+
pip install PyQt5 matplotlib scikit-learn pandas numpy
97+
```
98+
99+
---
100+
101+
## Project Structure
102+
103+
```txt
104+
AcadAI/
105+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# pkg
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# analytics/analytics_engine.py
2+
import statistics
3+
from database.db_manager import DatabaseManager
4+
from config import MAX_GPA_CHART_STUDENTS
5+
6+
class AnalyticsEngine:
7+
def __init__(self, db: DatabaseManager):
8+
self.db = db
9+
10+
def get_dashboard_stats(self):
11+
return self.db.get_stats()
12+
13+
def get_gpa_chart_data(self):
14+
students = self.db.get_all_students()
15+
# Limit number of students shown in the GPA chart to avoid visual saturation
16+
max_n = MAX_GPA_CHART_STUDENTS if MAX_GPA_CHART_STUDENTS and MAX_GPA_CHART_STUDENTS > 0 else len(students)
17+
students = students[:max_n]
18+
names = [s['name'].split()[0] for s in students]
19+
gpas = [s['gpa'] for s in students]
20+
return names, gpas
21+
22+
def get_subject_chart_data(self):
23+
avgs = self.db.get_subject_averages()
24+
labels = ['Attendance', 'Quiz', 'Assignment', 'Midterm']
25+
values = [avgs['attendance'], avgs['quiz'], avgs['assignment'], avgs['midterm']]
26+
return labels, values
27+
28+
def get_risk_breakdown(self):
29+
students = self.db.get_all_students()
30+
low = sum(1 for s in students if s['risk_level'] == 'Low')
31+
med = sum(1 for s in students if s['risk_level'] == 'Medium')
32+
high = sum(1 for s in students if s['risk_level'] == 'High')
33+
return {'Low': low, 'Medium': med, 'High': high}
34+
35+
def get_gpa_bins(self):
36+
gpas = self.db.get_gpa_distribution()
37+
bins = {'<2.0': 0, '2.0–2.5': 0, '2.5–3.0': 0, '3.0–3.5': 0, '3.5–4.0': 0}
38+
for g in gpas:
39+
if g < 2.0: bins['<2.0'] += 1
40+
elif g < 2.5: bins['2.0–2.5'] += 1
41+
elif g < 3.0: bins['2.5–3.0'] += 1
42+
elif g < 3.5: bins['3.0–3.5'] += 1
43+
else: bins['3.5–4.0'] += 1
44+
return bins
45+
46+
def get_performance_insights(self):
47+
stats = self.get_dashboard_stats()
48+
insights = []
49+
avg_gpa = stats.get('avg_gpa', 0) or 0
50+
avg_att = stats.get('avg_att', 0) or 0
51+
at_risk = stats.get('at_risk', 0) or 0
52+
if avg_gpa >= 3.3:
53+
insights.append({'icon': '🌟', 'text': f'Average GPA {avg_gpa:.2f} — class is performing well', 'color': '#10B981'})
54+
elif avg_gpa < 2.8:
55+
insights.append({'icon': '⚠️', 'text': f'Average GPA {avg_gpa:.2f} — intervention recommended', 'color': '#EF4444'})
56+
if avg_att >= 85:
57+
insights.append({'icon': '✅', 'text': f'Attendance at {avg_att:.1f}% — excellent engagement', 'color': '#10B981'})
58+
elif avg_att < 75:
59+
insights.append({'icon': '📅', 'text': f'Attendance at {avg_att:.1f}% — needs improvement', 'color': '#F59E0B'})
60+
if at_risk > 0:
61+
insights.append({'icon': '🚨', 'text': f'{at_risk} student(s) at high risk — require attention', 'color': '#EF4444'})
62+
if not insights:
63+
insights.append({'icon': '📊', 'text': 'All metrics within normal range', 'color': '#4F6EF7'})
64+
return insights
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# pkg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# pkg

0 commit comments

Comments
 (0)