28 Commits

Author SHA1 Message Date
David Monllaó
e477e1350a MDL-67217 unittest: usleep and windows don't get along well 2019-11-22 07:41:07 +08:00
David Monllaó
abc745fbd0 MDL-66498 analytics: get_samples() with no params limit 2019-09-11 12:44:55 +08:00
David Monllaó
3cb0aaaa8c MDL-65633 analytics: New interfaces for time-splitting methods 2019-07-18 18:38:13 +02:00
Eloy Lafuente (stronk7)
0d575a542a Merge branch 'MDL-65248_master' of git://github.com/dmonllao/moodle 2019-04-23 13:50:22 +02:00
David Monllaó
7063b665e0 MDL-65248 core_course: Move analytics targets to course
MOV [coursealreadyfinished, moodle], [coursealreadyfinished, course]
MOV [coursenotyetstarted, moodle], [coursenotyetstarted, course]
MOV [coursenotyetfinished, moodle], [coursenotyetfinished, course]
MOV [nocourseactivity, moodle], [nocourseactivity, course]
MOV [nocourseendtime, moodle], [nocourseendtime, course]
MOV [nocoursesections, moodle], [nocoursesections, course]
MOV [nocoursestudents, moodle], [nocoursestudents, course]
MOV [studentsatriskincourse, moodle], [studentsatriskincourse, course]
MOV [target:coursecompletion, moodle], [target:coursecompletion, course]
MOV [target:coursecompletion_help, moodle], [target:coursecompletion_help, course]
MOV [target:coursecompetencies, moodle], [target:coursecompetencies, course]
MOV [target:coursecompetencies_help, moodle], [target:coursecompetencies_help, course]
MOV [target:coursedropout, moodle], [target:coursedropout, course]
MOV [target:coursedropout_help, moodle], [target:coursedropout_help, course]
MOV [target:coursegradetopass, moodle], [target:coursegradetopass, course]
MOV [target:coursegradetopass_help, moodle], [target:coursegradetopass_help, course]
MOV [target:noteachingactivity, moodle], [target:noteachingactivity, course]
MOV [target:noteachingactivity_help, moodle], [target:noteachingactivity_help, course]
MOV [target:upcomingactivitiesdue, moodle], [target:upcomingactivitiesdue, course]
MOV [target:upcomingactivitiesdue_help, moodle], [target:upcomingactivitiesdue_help, course]
MOV [targetlabelstudentcompletionno, moodle], [targetlabelstudentcompletionno, course]
MOV [targetlabelstudentcompletionyes, moodle], [targetlabelstudentcompletionyes, course]
MOV [targetlabelstudentcompetenciesno, moodle], [targetlabelstudentcompetenciesno, course]
MOV [targetlabelstudentcompetenciesyes, moodle], [targetlabelstudentcompetenciesyes, course]
MOV [targetlabelstudentdropoutyes, moodle], [targetlabelstudentdropoutyes, course]
MOV [targetlabelstudentdropoutno, moodle], [targetlabelstudentdropoutno, course]
MOV [targetlabelstudentgradetopassno, moodle], [targetlabelstudentgradetopassno, course]
MOV [targetlabelstudentgradetopassyes, moodle], [targetlabelstudentgradetopassyes, course]
MOV [targetlabelteachingyes, moodle], [targetlabelteachingyes, course]
MOV [targetlabelteachingno, moodle], [targetlabelteachingno, course]
MOV [coursetoolong, analytics], [coursetoolong, course]
MOV [errorendbeforestart, analytics], [errorendbeforestart, course]
2019-04-15 09:45:50 +02:00
David Monllaó
fccc728fcc MDL-64783 analytics: Performance improvements
- Removed redundant query to analytics_predict_samples
- Analysers API now uses recordsets to iterate through the analysable
  elements. They take the last analysed time into account.
- New method for targets so there is no need to always update the last
  analysis time. Useful for lightweight targets.
2019-04-09 00:29:57 +02:00
David Monllaó
9f690999ec MDL-64783 analytics: Performance improvements and internal refactoring
The base classes analyser and time-splitting method had too many
reponsibilities. A new analysis class has been created.
2019-04-09 00:26:39 +02:00
David Mudrák
aa8af6fcfc MDL-61667 analytics: Fix checking that a given model does not exist
The original implementation did not work well for checking that the
given model does NOT exist. If no record was found in the
analytics_models table, the code execution continued and it reached the
moment when indicators were checked. If no indicators were provided, the
call ended up with error 'array_keys() expects parameter 1 to be array,
boolean given' (because indicators were set to false).
2019-04-01 14:23:06 +02:00
David Mudrák
3b7c7918f3 MDL-61667 analytics: Deprecate the add_builtin_models() method
The functionality of the \core_analytics\manager::add_builtin_models()
method is to be 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 will be done by updating the
lib/db/analytics.php file and bumping the core version.
2019-04-01 14:23:06 +02:00
David Mudrák
c679d39c36 MDL-64996 analytics: Don't mark static model as untrained after clearing
Static predictions models (i.e. those using a target based on
assumptions, not facts) are always considered as trained. Clearing them
must not mark them as untrained. Doing so would make them being skipped
by the prediction scheduled task.
2019-03-25 08:56:11 +01:00
David Mudrák
066a4d6493 MDL-64786 analytics: Allow renaming models via inplace editable element 2019-04-15 08:22:13 +02:00
David Monllaó
c70a7194f4 MDL-60944 analytics: Include trained ML models 2019-02-26 10:58:41 +01:00
David Monllaó
e4453adc55 MDL-60944 tool_analytics: Adding create and delete features
Extra modifications to refine the preexisting patch.
2019-02-25 09:54:07 +01:00
Ankit Agarwal
349c44128d MDL-60944 analytics: Add base support for import / export 2019-02-25 09:54:07 +01:00
David Monllao
ba211d5678 MDL-61062 analytics: Fix unit test wrong statement 2017-12-20 07:29:01 +01:00
Ankit Agarwal
fabe98ac92 MDL-60861 analytics: Enabling a model requires timesplitting 2017-12-11 10:47:01 +05:30
David Monllao
325b3bdd8e MDL-59988 analytics: Files marked as used only if valid
- Basic unit test for minimum machine learning backends requirements
- Warning return messages now include not enough data
- Clear models when the predictions processor is changed
- Refined the name of a couple of constants / methods
2017-10-13 12:24:17 +02:00
David Monllao
dd13fc222c MDL-59694 analytics: Track processed analysables 2017-10-09 07:47:28 +02:00
David Monllao
abafbc8405 MDL-59630 analytics: mlbackend model directories deletion 2017-10-03 10:34:47 +02:00
David Monllao
99b84a26f9 MDL-59630 analytics: Purge everything when the model is deleted 2017-10-03 10:07:32 +02:00
David Monllao
cab7abec70 MDL-59779 analytics: Bulk-insert predictions 2017-08-17 20:55:38 +02:00
David Monllao
e709e54435 MDL-57791 analytics: Add builtin models during upgrade 2017-07-24 08:37:01 +02:00
David Monllao
206d7aa9ad MDL-59212 analytics: Move API uses out of analytics dir
Part of MDL-57791 epic.
2017-07-24 08:37:00 +02:00
David Monllao
413f19bc49 MDL-59211 analytics: Make cibot happy
Part of MDL-57791 epic.
2017-07-24 08:36:49 +02:00
David Monllao
1611308b58 MDL-57791 analytics: Changes after review
- Split model::predict in parts
- JS promises updated according to eslint-plugin-promise
- New API methods replacing direct DB queries
- Reduce insights nav link display cost
- Increase time limit as well as memory for big processes
- Move prediction action event to core
- Dataset write locking and others
- Refine last time range end time
- Removed dodgy splitting method id to int
- Replace admin_setting_predictor output_html overwrite for write_setting overwrite
- New APIs for access control
- Discard invalid samples also during prediction
2017-07-24 08:36:49 +02:00
David Monllao
bd164083eb MDL-59057 analytics: Unit test fixes
Updating tests according to courses - site_courses analysers change.

Part of MDL-57791 epic.
2017-07-24 08:36:45 +02:00
David Monllao
8de0d1da61 MDL-57791 testing: Switch to analytics API namespace 2017-07-24 08:36:19 +02:00
David Monllao
ff656baeab MDL-58859 analytics: Add tests to core
Part of MDL-57791 epic.
2017-07-24 07:53:10 +02:00