Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

What are the advantages and disadvantages of using direct costing?

Answered: 1 week ago