Skip to content
Laviyx Learn

Try

Final-year project

Student Performance Prediction with Machine Learning

A data analysis and machine learning project that explores what affects students' final marks and predicts which students are at risk of failing, so teachers can help early.

Intermediate 6–10 weeks 2–3 studentsUpdated

Pythonpandasmatplotlib or seabornscikit-learn

The problem

Teachers usually find out a student is struggling only after the final exam. If a model can flag at-risk students from earlier information such as attendance, study time and internal marks, teachers can help them in time.

A public dataset to start with is the Student Performance dataset in the UCI Machine Learning Repository. It has records of secondary school students in Portugal with study time, past failures, absences, family background and grades for three periods. If your college allows it, you can also use anonymised data from your own department.

Features to build

  • Explore the data: grade distribution, missing values and how absences, study time and past failures relate to the final grade
  • Define the target clearly, for example pass or fail from the final grade
  • Prepare features in a pipeline: scale numeric columns and one-hot encode categorical ones
  • Train and compare a simple baseline, logistic regression and a tree-based model
  • Evaluate with recall and precision for the at-risk class and a confusion matrix
  • Show the most important factors behind the predictions
  • A simple form where a teacher enters a student's details and sees the risk

Build plan

  1. 1

    Read the dataset description

    Understand every column and where the data came from. Note any columns that would not be known early, because using them makes the model less useful.

  2. 2

    Exploratory data analysis

    Use pandas and charts to look at distributions and relationships. Write down three findings in plain words.

  3. 3

    Define the target and split

    Create the pass or fail column, then make a stratified train and test split before any model fitting.

  4. 4

    Build pipelines

    Use ColumnTransformer for scaling and encoding inside a Pipeline with each model.

  5. 5

    Compare and tune

    Use cross-validation on the training set, with a baseline that always predicts the majority class to beat.

  6. 6

    Evaluate and explain

    Report the test metrics and confusion matrix, and the top factors from feature importance or coefficients.

  7. 7

    Demo and report

    Build the input form, then write up the data, method, results, limitations and ethical points such as fairness and privacy.

Learn these first

Each part of the project is taught in one of these free lessons.

Make it stand out

  • Compare models trained with and without the earlier period grades, and explain the difference
  • Predict the exact final mark with regression and compare the errors
  • Check that the model works equally well for different groups of students
  • A dashboard of at-risk students for a class

Viva and interview questions

Try to answer each one aloud before you open it.

  • Why did you compare with a baseline model?

    A baseline, such as always predicting the most common class, shows the score you get with no learning. A model is only useful if it clearly beats it.

  • Which metric did you focus on and why?

    Recall for the at-risk class, because missing a student who needs help is the costlier mistake. I also watch precision so teachers are not flooded with false alarms.

  • Earlier period grades predict the final grade very well. Is that a problem?

    It depends on when the prediction is needed. They are strong predictors, but if we want to warn students at the start of the term, those grades are not available yet. I trained models with and without them to show both cases.

  • What is one-hot encoding?

    It turns a categorical column into one 0/1 column per category, so models that need numbers can use it without assuming an order between categories.

  • What ethical issues does this project have?

    Student data is personal, so it must be anonymised and used with permission. The model may be less accurate for some groups, so it should support teachers' judgement, never replace it or label students.

What to put in your project report

  1. Abstract: the problem, your solution and the result in one paragraph.
  2. Introduction and problem statement: who has the problem and why it matters.
  3. Requirements: the features (functional) and qualities such as speed and security (non-functional).
  4. Design: architecture diagram, database tables or data flow, and screen layouts.
  5. Implementation: the main modules and the most interesting code, explained.
  6. Testing: the test cases you ran, with inputs, expected and actual results.
  7. Results: screenshots or numbers that show the project working.
  8. Conclusion and future scope: what you achieved and what you would add next.

Your college may give its own format. Follow that first, and use this list to check nothing is missing.

All project ideas →