moodle/analytics/upgrade.txt

37 lines
2.3 KiB
Text

This files describes API changes in analytics sub system,
information provided here is intended especially for developers.
=== 3.7 ===
* \core_analytics\regressor::evaluate_regression and \core_analytics\classifier::evaluate_classification
have been updated to include a new $trainedmodeldir param. This new param will be used to evaluate the
existing trained model.
* Plugins and core subsystems can now declare default prediction models by describing them in
their db/analytics.php file. Models should not be created manually via the db/install.php
file any more.
* The method \core_analytics\manager::add_builtin_models() has been deprecated. The functionality
has been replaced with automatic update of models provided by the core moodle component. There
is no need to call this method explicitly any more. Instead, adding new models can be achieved
by updating the lib/db/analytics.php file and bumping the core version.
* \core_analytics\local\time_splitting\base::append_rangeindex and
\core_analytics\local\time_splitting\base::infer_sample_info are now marked as final and can not
be overwritten.
* \core_analytics\model::execute_prediction_callbacks now returns an array with both sample's contexts
and the prediction records.
* \core_analytics\local\analyser\base::get_most_recent_prediction_range has been moved to
\core_analytics\local\time_splitting\base::get_most_recent_prediction_range and it is not overwritable
by time splitting methods.
* Time splitting methods can now re-implement include_range_info_in_training_data() and
get_training_ranges() methods. They can be used to create time splitting methods with a pre-defined
number of ranges.
* Analysers can overwrite a new one_sample_per_analysable method if the analysables they use only have
one sample. The insights generated by models will then include the suggested actions in
the notification.
* The visibility of target's ignored_predicted_classes method must now be public.
=== 3.5 ===
* There are two new methods for analysers, processes_user_data() and join_sample_user(). You
need to overwrite them if your analyser uses user data. As a general statement, you should
overwrite these new methods if your samples return 'user' data. These new methods are used
for analytics' privacy API implementation.