diff --git a/requirements.txt b/requirements.txt index bedcb73..32ff2a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ importlib-metadata>=1.7.0 momentum>=0.2.5 numpy>=1.19.5 pytz>=2021.3 +scikit-learn diff --git a/tests/test_freq.py b/tests/test_freq.py index 78ff2e2..20bfc62 100644 --- a/tests/test_freq.py +++ b/tests/test_freq.py @@ -14,14 +14,15 @@ def test_date_stuff(): def test_inference(): # https://github.com/pandas-dev/pandas/blob/master/pandas/tseries/frequencies.py - expected = {'S':[RECENT_SECONDS + j for j in range(200)], - '5S':[RECENT_SECONDS + 5 * j for j in range(200)], - 'T':[RECENT_SECONDS + 60 * j for j in range(200)], - '5T':[RECENT_SECONDS + 5 * 60 * j for j in range(200)]} # 5 minutes + expected = {'s':[RECENT_SECONDS + j for j in range(200)], + '5s':[RECENT_SECONDS + 5 * j for j in range(200)], + 'min':[RECENT_SECONDS + 60 * j for j in range(200)], + '5min':[RECENT_SECONDS + 5 * 60 * j for j in range(200)]} # 5 minutes for expected_freq, t in expected.items(): freq = infer_freq_from_epoch(t) assert freq==expected_freq if __name__=='__main__': - test_date_stuff() \ No newline at end of file + test_date_stuff() + test_inference() \ No newline at end of file diff --git a/tests/tsa/test_tsa_ensemble.py b/tests/tsa/test_tsa_ensemble.py index b7fbcf3..b84dacf 100644 --- a/tests/tsa/test_tsa_ensemble.py +++ b/tests/tsa/test_tsa_ensemble.py @@ -9,7 +9,7 @@ fs = [ tsa_p1_d0_q0, tsa_p1_d0_q1 ] - from timemachines.skatertools.ensembling import precision_weighted_ensemble_factory + from timemachines.skatertools.ensembling.ensemblefactory import precision_weighted_ensemble_factory def my_skater(y,s,k,**ignore): return precision_weighted_ensemble_factory(y=y,s=s,k=k,fs=fs)