def test_daily(): # Авторегрессионное интегрированное скользящее среднее # https://docs.google.com/viewer?url=http%3A%2F%2Fjmlda.org%2Fpapers%2Fdoc%2F2011%2Fno1%2FFadeevEtAl2011Autoreg.pdf TIME = 24*60*60*7*4*2 p1 = [UserProfileSource(0, TIME, profile=UserProfile(RATES_1, 10, 0.1)) for x in range(10)] p2 = [UserProfileSource(0, TIME, profile=UserProfile(RATES_2, 10, 0.1)) for x in range(5)] profiles = p1 + p2 process_2(it_merge(*profiles, sort=lambda x: x[2]))
def test_change_group(rates, rates2, rates3, rates4): TIME = 24*60*60*7*4*2 p1 = [UserProfileChangeBehaviorSource(0, TIME, profile=UserProfile(rates, 10, 0.1), profile2=UserProfile(rates2, 10, 0.1), when_to_change=TIME//2) for x in range(10)] p2 = [UserProfileChangeBehaviorSource(0, TIME, profile=UserProfile(rates3, 10, 0.1), profile2=UserProfile(rates4, 10, 0.1), when_to_change=TIME//2) for x in range(5)] profiles = p1 + p2 process_2(it_merge(*profiles, sort=lambda x: x[2])) print(alarms)