MDL-65639 tool_analytics: Reworded language strings
[moodle.git] / analytics / upgrade.txt
CommitLineData
97b0a6cb
DM
1This files describes API changes in analytics sub system,
2information provided here is intended especially for developers.
3
bc82b895
DM
4=== 3.7 ===
5
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.
606c3be0
DM
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.
3b7c7918
DM
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.
50935afb
DM
16* \core_analytics\model::execute_prediction_callbacks now returns an array with both sample's contexts
17 and the prediction records.
ed47112e 18* \core_analytics\model::export() now expects the renderer instance as an argument.
fccc728f
DM
19* Time splitting methods:
20 * \core_analytics\local\time_splitting\base::append_rangeindex and
21 \core_analytics\local\time_splitting\base::infer_sample_info are now marked as final and can not
22 be overwritten.
23 * Can now overwrite include_range_info_in_training_data() and
24 get_training_ranges() methods. They can be used to create time splitting methods with a pre-defined
25 number of ranges.
26 * Can now overwrite cache_indicator_calculations(). You should return false if the time frames generated
27 by your time-splitting method are unique and / or can hardly be reused by further models.
5f1f0ee6
DM
28 * Can now overwrite valid_for_evaluation(). You can return false if the time-splitting method can not be
29 used to evaluate prediction models or if it does not make sense to evaluate prediction models with it,
30 as for example upcoming_periodic children classes.
fccc728f
DM
31 * \core_analytics\local\analyser\base::get_most_recent_prediction_range has been moved to
32 \core_analytics\local\time_splitting\base::get_most_recent_prediction_range and it is not overwritable
33 by time splitting methods.
34* Targets:
35 * The visibility of the following methods must now be public: ignored_predicted_classes()
36 and get_insights_users()
37 * Prediction_actions() has now a 3rd parameter $isinsightuser. This parameter is true
38 when we are listing actions for the user that will receives the insight.
39 * Can now implement a always_update_analysis_time() method so analysable elements' timeanalysed is
40 only updated when analysable elements have been successfully evaluated. It is useful for lightweight targets.
41 * Can not implement two new methods to tune the insights generated by the model: get_insight_subject()
42 and get_insight_context_url().
43* Analysers:
44 * The visibility of get_all_samples() method must now be public.
45 * get_analysables() method has been deprecated in favour of a new get_analysables_interator()
46 for performance reasons.
47 * Can overwrite a new one_sample_per_analysable() method if the analysables they use only have
48 one sample. The insights generated by models will then include the suggested actions in
49 the notification.
bc82b895 50
97b0a6cb
DM
51=== 3.5 ===
52
53* There are two new methods for analysers, processes_user_data() and join_sample_user(). You
54 need to overwrite them if your analyser uses user data. As a general statement, you should
55 overwrite these new methods if your samples return 'user' data. These new methods are used
56 for analytics' privacy API implementation.