Time splitting method that generates predictions periodically.
More...
|
static | get_name () |
| Returns a lang_string object representing the name for the time splitting method.
|
|
|
core_analytics analysable | $analysable |
|
string | $id |
|
int | $modelid |
| The model id.
|
|
array | $ranges = [] |
|
Time splitting method that generates predictions periodically.
- Copyright
- 2019 David Monllao
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ append_rangeindex()
core_analytics\local\time_splitting\base::append_rangeindex |
( |
| $sampleid, |
|
|
| $rangeindex ) |
|
finalinherited |
Generates a unique sample id (sample in a range index).
- Parameters
-
int | $sampleid | |
int | $rangeindex | |
- Return values
-
◆ cache_indicator_calculations()
core_analytics\local\time_splitting\upcoming_periodic::cache_indicator_calculations |
( |
| ) |
|
◆ define_ranges()
core_analytics\local\time_splitting\periodic::define_ranges |
( |
| ) |
|
|
protectedinherited |
◆ get_all_ranges()
core_analytics\local\time_splitting\base::get_all_ranges |
( |
| ) |
|
|
inherited |
Returns the ranges used by this time splitting method.
- Return values
-
◆ get_analysable()
core_analytics\local\time_splitting\base::get_analysable |
( |
| ) |
|
|
inherited |
get_analysable
- Return values
-
◆ get_distinct_ranges()
core_analytics\local\time_splitting\base::get_distinct_ranges |
( |
| ) |
|
|
inherited |
Returns the distinct range indexes in this time splitting method.
- Return values
-
◆ get_first_start()
core_analytics\local\time_splitting\upcoming_periodic::get_first_start |
( |
| ) |
|
|
protected |
◆ get_id()
core_analytics\local\time_splitting\base::get_id |
( |
| ) |
|
|
inherited |
Returns the time splitting method id.
- Return values
-
◆ get_most_recent_prediction_range()
core_analytics\local\time_splitting\base::get_most_recent_prediction_range |
( |
| ) |
|
|
inherited |
Returns the most recent range that can be used to predict.
This method is only called when calculating predictions.
- Return values
-
◆ get_name()
static core_analytics\local\time_splitting\base::get_name |
( |
| ) |
|
|
staticabstractinherited |
Returns a lang_string object representing the name for the time splitting method.
Used as column identificator.
If there is a corresponding '_help' string this will be shown as well.
- Return values
-
Reimplemented in core\analytics\time_splitting\deciles, core\analytics\time_splitting\deciles_accum, core\analytics\time_splitting\no_splitting, core\analytics\time_splitting\one_month_after_start, core\analytics\time_splitting\one_week_after_start, core\analytics\time_splitting\past_3_days, core\analytics\time_splitting\past_month, core\analytics\time_splitting\past_week, core\analytics\time_splitting\quarters, core\analytics\time_splitting\quarters_accum, core\analytics\time_splitting\single_range, core\analytics\time_splitting\ten_percent_after_start, core\analytics\time_splitting\upcoming_3_days, core\analytics\time_splitting\upcoming_fortnight, and core\analytics\time_splitting\upcoming_week.
◆ get_next_range()
core_analytics\local\time_splitting\upcoming_periodic::get_next_range |
( |
\DateTimeImmutable | $time | ) |
|
|
protected |
Gets the next range with start on the provided time.
The next range is based on the upcoming period so we add this range's periodicity to $time.
- Parameters
-
- Return values
-
Reimplemented from core_analytics\local\time_splitting\periodic.
◆ get_range_by_index()
core_analytics\local\time_splitting\base::get_range_by_index |
( |
| $rangeindex | ) |
|
|
inherited |
Returns range data by its index.
- Parameters
-
- Return values
-
array|false | Range data or false if the index is not part of the existing ranges. |
◆ get_training_ranges()
core_analytics\local\time_splitting\periodic::get_training_ranges |
( |
| ) |
|
|
inherited |
◆ include_range_info_in_training_data()
core_analytics\local\time_splitting\periodic::include_range_info_in_training_data |
( |
| ) |
|
|
inherited |
◆ infer_sample_info()
core_analytics\local\time_splitting\base::infer_sample_info |
( |
| $uniquesampleid | ) |
|
|
finalinherited |
Returns the sample id and the range index from a uniquesampleid.
- Parameters
-
- Return values
-
array | array($sampleid, $rangeindex) |
◆ is_valid_analysable()
◆ periodicity()
core_analytics\local\time_splitting\periodic::periodicity |
( |
| ) |
|
|
abstractprotectedinherited |
◆ ready_to_predict()
core_analytics\local\time_splitting\base::ready_to_predict |
( |
| $range | ) |
|
|
inherited |
◆ ready_to_train()
core_analytics\local\time_splitting\base::ready_to_train |
( |
| $range | ) |
|
|
inherited |
Should we use this time range for training?
- Parameters
-
- Return values
-
◆ set_analysable()
Assigns the analysable and updates the time ranges according to the analysable start and end dates.
- Parameters
-
- Return values
-
◆ set_modelid()
core_analytics\local\time_splitting\base::set_modelid |
( |
int | $modelid | ) |
|
|
inherited |
Assigns the model id to this time-splitting method it case it needs it.
- Parameters
-
◆ update_last_range()
core_analytics\local\time_splitting\periodic::update_last_range |
( |
array | $ranges | ) |
|
|
protectedinherited |
◆ valid_for_evaluation()
core_analytics\local\time_splitting\upcoming_periodic::valid_for_evaluation |
( |
| ) |
|
◆ validate_ranges()
core_analytics\local\time_splitting\base::validate_ranges |
( |
| ) |
|
|
protectedinherited |
Validates the time splitting method ranges.
- Exceptions
-
- Return values
-
The documentation for this class was generated from the following file:
- analytics/classes/local/time_splitting/upcoming_periodic.php