Time splitting method that generates weekly predictions.
More...
|
static | get_name () |
| The time splitting method name.
|
|
|
core_analytics analysable | $analysable |
|
string | $id |
|
int | $modelid |
| The model id.
|
|
array | $ranges = [] |
|
Time splitting method that generates weekly predictions.
- 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 |
( |
| ) |
|
|
inherited |
◆ 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 |
( |
| ) |
|
|
protectedinherited |
◆ 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\time_splitting\upcoming_week::get_name |
( |
| ) |
|
|
static |
◆ get_next_range()
core_analytics\local\time_splitting\upcoming_periodic::get_next_range |
( |
\DateTimeImmutable | $time | ) |
|
|
protectedinherited |
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\time_splitting\upcoming_week::periodicity |
( |
| ) |
|
◆ 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 |
( |
| ) |
|
|
inherited |
◆ 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:
- lib/classes/analytics/time_splitting/upcoming_week.php