MDL-64783 analytics: Updated insight subject for course_enrolments
[moodle.git] / analytics / upgrade.txt
... / ...
1This files describes API changes in analytics sub system,
2information provided here is intended especially for developers.
4=== 3.7 ===
6* \core_analytics\regressor::evaluate_regression and \core_analytics\classifier::evaluate_classification
7 have been updated to include a new $trainedmodeldir param. This new param will be used to evaluate the
8 existing trained model.
9* Plugins and core subsystems can now declare default prediction models by describing them in
10 their db/analytics.php file. Models should not be created manually via the db/install.php
11 file any more.
12* The method \core_analytics\manager::add_builtin_models() has been deprecated. The functionality
13 has been replaced with automatic update of models provided by the core moodle component. There
14 is no need to call this method explicitly any more. Instead, adding new models can be achieved
15 by updating the lib/db/analytics.php file and bumping the core version.
16* \core_analytics\local\time_splitting\base::append_rangeindex and
17 \core_analytics\local\time_splitting\base::infer_sample_info are now marked as final and can not
18 be overwritten.
19* \core_analytics\model::execute_prediction_callbacks now returns an array with both sample's contexts
20 and the prediction records.
21* \core_analytics\local\analyser\base::get_most_recent_prediction_range has been moved to
22 \core_analytics\local\time_splitting\base::get_most_recent_prediction_range and it is not overwritable
23 by time splitting methods.
24* Time splitting methods can now re-implement include_range_info_in_training_data() and
25 get_training_ranges() methods. They can be used to create time splitting methods with a pre-defined
26 number of ranges.
27* Analysers can overwrite a new one_sample_per_analysable method if the analysables they use only have
28 one sample. The insights generated by models will then include the suggested actions in
29 the notification.
30* The visibility of target's ignored_predicted_classes method must now be public.
31* The visibility of analyser's get_all_samples method must now be public.
32* Target's prediction_actions() has now a 3rd parameter $isinsightuser. This parameter is true
33 when we are listing actions for the user that will receives the insight.
35=== 3.5 ===
37* There are two new methods for analysers, processes_user_data() and join_sample_user(). You
38 need to overwrite them if your analyser uses user data. As a general statement, you should
39 overwrite these new methods if your samples return 'user' data. These new methods are used
40 for analytics' privacy API implementation.