Question: Your task is to write a function that takes in a 1-d Numpy array of actual initial values, a numeric weight scaler (between 0.9 and

Your task is to write a function that takes in a 1-d Numpy array of actual initial values, a numeric weight scaler (between 0.9 and 0.99) and the number of previous time steps for prediction k, and return a numpy array of forecasted values for all values in that array starting with the k+1st one (we need to use the first k actual values to forecast the first observation). The idea here is that the most recent observation takes on a higher weight than less-recent observations in the data. Please use Numpy vectorization methods to solve the problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!