Runs an analysis of the site.  
 More...
|  | 
| static | clean_time_splitting_id ($timesplittingid) | 
|  | Remove all possibly problematic chars from the time splitting method id (id = its full class name). 
 | 
|  | 
| static | fill_firstanalyses_cache (int $modelid, ?int $analysableid=null) | 
|  | Fills a cache containing the first time each analysable in the provided model was analysed. 
 | 
|  | 
|  | 
|  | add_context_metadata (\core_analytics\local\time_splitting\base $timesplitting, array &$dataset, core_analytics\local\target\base $target) | 
|  | Adds dataset context info. 
 | 
|  | 
|  | calculate_indicators (\core_analytics\local\time_splitting\base $timesplitting, array $sampleids, array $ranges) | 
|  | Calculates indicators. 
 | 
|  | 
|  | fill_dataset (\core_analytics\local\time_splitting\base $timesplitting, array &$dataset, ?array $calculatedtarget=null) | 
|  | Adds time range indicators and the target to each sample. 
 | 
|  | 
|  | filter_out_prediction_samples_and_ranges (array &$sampleids, array &$ranges, core_analytics\local\time_splitting\base $timesplitting) | 
|  | Filters out samples that have already been used for prediction. 
 | 
|  | 
|  | filter_out_train_samples (array &$sampleids, core_analytics\local\time_splitting\base $timesplitting) | 
|  | Filters out samples that have already been used for training. 
 | 
|  | 
|  | get_processed_analysables () | 
|  | Get analysables that have been already processed. 
 | 
|  | 
|  | process_time_splitting (\core_analytics\local\time_splitting\base $timesplitting, core_analytics\analysable $analysable, core_analytics\local\target\base $target) | 
|  | Processes the analysable samples using the provided time splitting method. 
 | 
|  | 
|  | save_prediction_samples (array $sampleids, array $ranges, core_analytics\local\time_splitting\base $timesplitting, ?\stdClass $predictsamplesrecord=null) | 
|  | Saves samples that have just been used for prediction. 
 | 
|  | 
|  | save_train_samples (array $sampleids, core_analytics\local\time_splitting\base $timesplitting) | 
|  | Saves samples that have just been used for training. 
 | 
|  | 
|  | update_analysable_analysed_time (array $processedanalysables, int $analysableid) | 
|  | Updates the analysable analysis time. 
 | 
|  | 
Runs an analysis of the site. 
- Copyright
- 2019 David Monllao  
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ __construct()
◆ add_context_metadata()
Adds dataset context info. 
The final dataset document will look like this:
metadata1,metadata2,metadata3,..... value1, value2, value3,.....
header1,header2,header3,header4,..... stud1value1,stud1value2,stud1value3,stud1value4,..... stud2value1,stud2value2,stud2value3,stud2value4,..... 
.....
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ calculate()
Calculates indicators and targets. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ calculate_indicators()
Calculates indicators. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ clean_time_splitting_id()
  
  | 
        
          | static core_analytics\analysis::clean_time_splitting_id | ( |  | $timesplittingid | ) |  |  | static | 
 
Remove all possibly problematic chars from the time splitting method id (id = its full class name). 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ fill_dataset()
Adds time range indicators and the target to each sample. 
This will identify the sample as belonging to a specific range.
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ fill_firstanalyses_cache()
  
  | 
        
          | static core_analytics\analysis::fill_firstanalyses_cache | ( | int | $modelid, |  
          |  |  | ?int | $analysableid = null ) |  | static | 
 
Fills a cache containing the first time each analysable in the provided model was analysed. 
- Parameters
- 
  
    | int | $modelid |  |  | int | null | $analysableid |  |  
 
- Return values
- 
  
  
 
 
◆ filter_out_prediction_samples_and_ranges()
Filters out samples that have already been used for prediction. 
- Parameters
- 
  
  
- Return values
- 
  
    | stdClass|null | The analytics_predict_samples record or null |  
 
 
 
◆ filter_out_train_samples()
Filters out samples that have already been used for training. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_headers()
Returns the headers for the csv file based on the indicators and the target. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_processed_analysables()
  
  | 
        
          | core_analytics\analysis::get_processed_analysables | ( |  | ) |  |  | protected | 
 
Get analysables that have been already processed. 
- Return values
- 
  
  
 
 
◆ process_analysable()
Processes an analysable. 
This method returns the general analysable status, an array of files by time splitting method and an error message if there is any problem.
- Parameters
- 
  
  
- Return values
- 
  
    | stdClass[] | Results objects by time splitting method |  
 
 
 
◆ process_time_splitting()
Processes the analysable samples using the provided time splitting method. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ run()
      
        
          | core_analytics\analysis::run | ( | array | $contexts = [] | ) |  | 
      
 
Runs the analysis. 
- Parameters
- 
  
    | context[] | $contexts | Restrict the analysis to these contexts. No context restrictions if null. |  
 
- Return values
- 
  
  
 
 
◆ save_prediction_samples()
Saves samples that have just been used for prediction. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ save_train_samples()
Saves samples that have just been used for training. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ update_analysable_analysed_time()
  
  | 
        
          | core_analytics\analysis::update_analysable_analysed_time | ( | array | $processedanalysables, |  
          |  |  | int | $analysableid ) |  | protected | 
 
Updates the analysable analysis time. 
- Parameters
- 
  
    | array | $processedanalysables |  |  | int | $analysableid |  |  
 
- Return values
- 
  
  
 
 
The documentation for this class was generated from the following file: