Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function forecast_data with the following parameters. X: the list of n numbers that contains our data. X0,X1,...,Xn1X0,X1,...,Xn1 alpha: the tuning paramerter for the

Write a function forecast_data with the following parameters. X: the list of n numbers that contains our data. X0,X1,...,Xn1X0,X1,...,Xn1 alpha: the tuning paramerter for the baseline response. beta: the tuning paramerter for the trend. gamma: the tuning parameter for the seasonality. L: the length of the seasonality. The function should return a tuple of (S, T, C, forecasts). S - list of baseline values for the model. StSt for all t=0,1,...,n1t=0,1,...,n1 T - list of trend values for the model. TtTt for all t=0,1,...,n1t=0,1,...,n1 C - list of seasonality factors for the model. CtCt for all t=0,1,...,n1t=0,1,...,n1 forecasts - the list of forecasted values from time period L to n. HINT 1: When calling triple_es for time periods t=0,1,...,L1t=0,1,...,L1, you can use 1 as the prev_c parameter. For tLtL you must use CtLCtL. HINT 2: S, T, and C should have the same length as X. HINT 3: forecasts will have the length of n - L. This is because the forecast function needs values for Ct+1LCt+1L, so it cannot create forecasts for the first L time periods.

def forecast_data(X, alpha, beta, gamma, L): assert type(X) == list assert_numbers(X) assert_numbers([alpha, beta, gamma]) assert type(L) == int # # YOUR CODE HERE #

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 2 Lncs 8056

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013th Edition

3642401724, 978-3642401725

More Books

Students also viewed these Databases questions

Question

Prepare and properly label figures and tables for written reports.

Answered: 1 week ago