Python API - Bayesian Knowledge Tracing

The project

This was a multi-faceted project aimed at PHD research of BKT - Bayesian Knowledge Tracing applied to Moodle learning. The project involved:

  • A Flask Python API contained in Docker to do the heavy lifting of BKT analysis
  • Developing and hosting a Moodle site for ~100 students for a semester of quiz data


Details

We used the pyBKT library to do the heavy lifting of BKT analysis. The library was wrapped in a Flask API and hosted in a Docker container. The API was then called from the Moodle site to do the analysis of the quiz data.

The idea with this approach is to firstly have a normal quiz which collects data. This data is then used to train a model to predict how well the student understands the content.

The next part is to use that model in a new quiz where the goal is to only end the quiz when the student actually understands the content. This means we take the model and calculate mastery after each question. Mastery is a number from 0 -> 1 and we end the quiz at a configurable point, by default 0.95.

In Moodle, we developed two plugins:

  • A quiz reporting plugin that can take data from a quiz and train a BKT Model
  • A new BKT quiz based off the adaptive quiz plugin with the ability to end the quiz only after the student reaches mastery.

Result

The project was a success and the PHD student was able to use the data to further their research.