Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions ai_academic_fixed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# AcadAI — AI Academic Performance Prediction & Career Guidance System

**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.**

---

## Project Info

**Subject:** Artificial Intelligence
**Semester:** 4th
**Submitted To:** [Dr. Muhammad Siddique](mailto:msiddique@nfciet.edu.pk)

**Members:**

- [Faizan Ishfaq](https://github.com/faizanrajpoot774-debug)
- [Muawiya Amir](https://github.com/Muawiya-contact)

---

## Overview

**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.

Built with Python · PyQt5 · scikit-learn · SQLite · Matplotlib

---

## Features

| Feature | Description |
| ---------------------- | ------------------------------------------------------------------------------------- |
| GPA Prediction | Random Forest + Ridge Regression model predicts next semester GPA with ~91% accuracy |
| Weak Subject Detection | ML model identifies subjects needing attention and suggests improvement strategies |
| Career Recommendation | Matches student profile (GPA + skills + interests) to best-fit career paths |
| Skill Roadmap | Personalized step-by-step learning roadmap for chosen career goal |
| Study Planner | Generates weekly study schedules prioritizing weak subjects |
| AI Chatbot 🤖 | NLP-based academic assistant that reads live database and answers student queries |
| Analytics Dashboard | Interactive charts: GPA trends, subject radar, risk distribution, attendance analysis |
| Student Management | Add, edit, import students via CSV — full CRUD with SQLite backend |
| CSV Import/Export | Bulk import 60+ students from CSV; export reports |

---

## Installation

### Prerequisites

Make sure you have **Python 3.10+** installed:

```bash
python --version
```

### Step 1 — Clone the Repository

```bash
git clone https://github.com/your-username/acadai.git
cd acadAI
```

### Step 2 — Install Dependencies

```bash
pip install -r requirements.txt
```

### Step 3 — Generate Sample Dataset (First Time Only)

```bash
python generate_dataset.py
```

This creates `datasets/student_data.csv` with 60 realistic student records.

### Step 4 — Run the Application

```bash
python main.py
```

---

## Requirements

```batch
PyQt5>=5.15.0
matplotlib>=3.7.0
scikit-learn>=1.3.0
pandas>=2.0.0
numpy>=1.24.0
```

Install all at once:

```bash
pip install PyQt5 matplotlib scikit-learn pandas numpy
```

---

## Project Structure

```txt
AcadAI/
```
1 change: 1 addition & 0 deletions ai_academic_fixed/analytics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pkg
64 changes: 64 additions & 0 deletions ai_academic_fixed/analytics/analytics_engine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# analytics/analytics_engine.py
import statistics
from database.db_manager import DatabaseManager
from config import MAX_GPA_CHART_STUDENTS

class AnalyticsEngine:
def __init__(self, db: DatabaseManager):
self.db = db

def get_dashboard_stats(self):
return self.db.get_stats()

def get_gpa_chart_data(self):
students = self.db.get_all_students()
# Limit number of students shown in the GPA chart to avoid visual saturation
max_n = MAX_GPA_CHART_STUDENTS if MAX_GPA_CHART_STUDENTS and MAX_GPA_CHART_STUDENTS > 0 else len(students)
students = students[:max_n]
names = [s['name'].split()[0] for s in students]
gpas = [s['gpa'] for s in students]
return names, gpas

def get_subject_chart_data(self):
avgs = self.db.get_subject_averages()
labels = ['Attendance', 'Quiz', 'Assignment', 'Midterm']
values = [avgs['attendance'], avgs['quiz'], avgs['assignment'], avgs['midterm']]
return labels, values

def get_risk_breakdown(self):
students = self.db.get_all_students()
low = sum(1 for s in students if s['risk_level'] == 'Low')
med = sum(1 for s in students if s['risk_level'] == 'Medium')
high = sum(1 for s in students if s['risk_level'] == 'High')
return {'Low': low, 'Medium': med, 'High': high}

def get_gpa_bins(self):
gpas = self.db.get_gpa_distribution()
bins = {'<2.0': 0, '2.0–2.5': 0, '2.5–3.0': 0, '3.0–3.5': 0, '3.5–4.0': 0}
for g in gpas:
if g < 2.0: bins['<2.0'] += 1
elif g < 2.5: bins['2.0–2.5'] += 1
elif g < 3.0: bins['2.5–3.0'] += 1
elif g < 3.5: bins['3.0–3.5'] += 1
else: bins['3.5–4.0'] += 1
return bins

def get_performance_insights(self):
stats = self.get_dashboard_stats()
insights = []
avg_gpa = stats.get('avg_gpa', 0) or 0
avg_att = stats.get('avg_att', 0) or 0
at_risk = stats.get('at_risk', 0) or 0
if avg_gpa >= 3.3:
insights.append({'icon': '🌟', 'text': f'Average GPA {avg_gpa:.2f} — class is performing well', 'color': '#10B981'})
elif avg_gpa < 2.8:
insights.append({'icon': '⚠️', 'text': f'Average GPA {avg_gpa:.2f} — intervention recommended', 'color': '#EF4444'})
if avg_att >= 85:
insights.append({'icon': '✅', 'text': f'Attendance at {avg_att:.1f}% — excellent engagement', 'color': '#10B981'})
elif avg_att < 75:
insights.append({'icon': '📅', 'text': f'Attendance at {avg_att:.1f}% — needs improvement', 'color': '#F59E0B'})
if at_risk > 0:
insights.append({'icon': '🚨', 'text': f'{at_risk} student(s) at high risk — require attention', 'color': '#EF4444'})
if not insights:
insights.append({'icon': '📊', 'text': 'All metrics within normal range', 'color': '#4F6EF7'})
return insights
1 change: 1 addition & 0 deletions ai_academic_fixed/assets/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pkg
1 change: 1 addition & 0 deletions ai_academic_fixed/assets/styles/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pkg
Loading
Loading