microprediction / timemachines

Predict time-series with one line of code.
https://www.microprediction.com/blog/popular-timeseries-packages
MIT License
384 stars 50 forks source link

[bug] thinking fast and slow #98

Closed mglowacki100 closed 2 years ago

mglowacki100 commented 2 years ago

Hi, Nice approach with "fast and slow" but I'm a little confused about: https://github.com/microprediction/timemachines/blob/main/timemachines/skaters/simple/thinking.py namely functions thinking_slow_and_fast and thinking_fast_and_slow looks exactly the same:

def thinking_slow_and_fast(y :Y_TYPE, s:dict, k:int =1, a:A_TYPE =None, t:T_TYPE =None, e:E_TYPE =None)->([float] , Any , Any):
    """
           Apply defensive quickly moving average to residuals from a slowly moving average
    """
    return quickly_moving_hypocratic_residual_factory(y=y, s=s, k=k, a=a, t=t, e=e, f=slowly_moving_average)

def thinking_fast_and_slow(y :Y_TYPE, s:dict, k:int =1, a:A_TYPE =None, t:T_TYPE =None, e:E_TYPE =None)->([float] , Any , Any):
    """
          Apply defensive slowly moving average to residuals from a quickly moving average
    """
    return quickly_moving_hypocratic_residual_factory(y=y, s=s, k=k, a=a, t=t, e=e, f=slowly_moving_average)

maybe one of them should return: slowly_moving_hypocratic_residual_factory(y=y, s=s, k=k, a=a, t=t, e=e, f=quickly_moving_average) ?

microprediction commented 2 years ago

Thanks! Great catch I just fixed it https://github.com/microprediction/timemachines/blob/main/timemachines/skaters/simple/thinking.py

microprediction commented 2 years ago

btw I see you are on numerai. Give this a spin https://www.microprediction.com/competitions/daily