tspy.data_structures.forecasting.SeasonSelector module¶
-
class
tspy.data_structures.forecasting.SeasonSelector.
SeasonSelector
(tsc, j_season_selector)¶ Bases:
object
utility which determines a single season length when enough data has been collected
Methods
get_multi_season_length
(num_seasons, y)gets a maximum of N strongest signals (i.e resonances as determined by FFT) present in the given data.
Determines the strongest season length for the given number of samples
-
get_multi_season_length
(num_seasons, y)¶ gets a maximum of N strongest signals (i.e resonances as determined by FFT) present in the given data.
- Parameters
- num_seasonsint
the maximum number of signal periods
- ylist
the data to search for resonant frequencies
- Returns
- int
The season length(s) determined from the given samples. The number may be smaller than the given maxSeason value if the strength of the signal is too small
-
get_season_length
(y)¶ Determines the strongest season length for the given number of samples
- Parameters
- ylist
new regularly spaced values series data values
- Returns
- int
a positive integer representing the computed season length when enough data has been provided and the season can be computed. If not enough data is provided, return -1
-