Analytics API
The Moodle Analytics API allows Moodle site managers to define prediction models that combine indicators and a target.
The target is the event we want to predict. The indicators are what we think will lead to an accurate prediction of the target.
Moodle is able to evaluate these models and, if the prediction accuracy is high enough, Moodle internally trains a machine learning algorithm by using calculations based on the defined indicators within the site data. Once new data that matches the criteria defined by the model is available, Moodle starts predicting the probability that the target event will occur. Targets are free to define what actions will be performed for each prediction, from sending messages or feeding reports to building new adaptive learning activities.
An example of a model you may be interested in is the detection of students who are at risk of dropping out.
Possible indicators for this include:
- a lack of participation in previous activities
- poor grades in previous activities
The target would be whether the student is able to complete the course or not.
Moodle uses these indicators and the target for each student in a finished course to predict which students are at risk of dropping out in ongoing courses.
Summary
API components
This diagram shows the main components of the analytics API and the interactions between them.
Data flow
The diagram below shows the different stages data goes through, from the data a Moodle site contains to actionable insights.
API classes diagram
This is a summary of the API classes and their relationships. It groups the different parts of the framework that can be extended by 3rd parties to create your own prediction models.