Closed antoinecarme closed 7 years ago
Added a test collection under the dirfectory tests/periodicities, each test is performed on a generic dataset of size N, with a time frequency of freq and a periodic pattern of a given length.
To summarize, the code generation is the follwoing :
def generate_all():
lCycles = [ 5 , 7 , 12 , 15, 24, 30 , 60, 120, 360];
lFreqs = [('S' , 'Second'),
('T', 'Minute'),
('H' , 'Hour'),
('BH', 'Business_Hour'),
('D' , 'Day'),
('B', 'Business_Day'),
('W' , 'Week'),
('SM', 'Semi_Month'),
('M' , 'Month')]
for cyc in lCycles:
for freq in lFreqs:
lRows = [25, 50, 100, 200, 400, 1600, 3200];
if(freq[0] == 'W'):
lRows = [25, 50, 100, 200, 400, 1600];
if(freq[0] == 'SM'):
lRows = [25, 50, 100, 200, 400];
if(freq[0] == 'M'):
lRows = [25, 50, 100, 200, 400];
for nbrows in lRows:
gen_file(cyc , freq, nbrows);
The collection contains a total of about 540 individual scripts/models.
PyAF automatically detects periodic and seasonal patterns by analyzing trend residues.
Need some collection of automatic tests for periodicity analysis.
sample test : use an artificial dataset with a periodic pattern.