Have not analyzed big O performance but it is slow enough to be a nuisance for larger datasets, especially since this calculation needs to be repeated across train/test sets and perhaps even across folds.
The following lines need addressing:
|
sunset_idxs = np.zeros(len(datetime_series), dtype=int) |
|
for sunset in sunsets[1:]: |
|
change = np.where(datetime_series > sunset)[0][0] |
|
sunset_idxs[change:] += 1 |
Have not analyzed big O performance but it is slow enough to be a nuisance for larger datasets, especially since this calculation needs to be repeated across train/test sets and perhaps even across folds.
The following lines need addressing:
nowcastlib/nowcastlib/pipeline/process/postprocess/generate.py
Lines 130 to 133 in b24e0d8