Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Representation of a prediction.

Copyright: 2017 David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 255 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: prediction  - X-Ref

Representation of a prediction.

__construct($prediction, $sampledata)   X-Ref
Constructor

param: \stdClass|int $prediction
param: array $sampledata
return: void

get_prediction_data()   X-Ref
Get prediction object data.

return: \stdClass

get_sample_data()   X-Ref
Get prediction sample data.

return: array

get_calculations()   X-Ref
Gets the prediction calculations

return: array

action_executed($actionname, \core_analytics\local\target\base $target)   X-Ref
Stores the executed action.
Prediction instances should be retrieved using \core_analytics\manager::get_prediction,
It is the caller responsability to check that the user can see the prediction.

param: string $actionname
param: \core_analytics\local\target\base $target

get_executed_actions(array $actionnamefilter = null, int $userid = 0)   X-Ref
Get the executed actions.

Actions could be filtered by actionname.

param: array $actionnamefilter Limit the results obtained to this list of action names.
param: int $userid the user id. Current user by default.
return: array of actions.

format_calculations()   X-Ref
format_calculations

return: \stdClass[]

parse_feature_name($featurename)   X-Ref
parse_feature_name

param: string $featurename
return: string[]