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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started