Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As a student who has recently taken CS 3 5 7 , Paul is eager to put his knowledge learned in the class to use

As a student who has recently taken CS 357, Paul is eager to put his knowledge learned in the class to use in real-world applications. He notices the weather forcast in Champaign-Urbana area is not very accurate and is determined to make it better.
After a summer of hard work, he has finished implementing his new software for predicting wind speed. Eager to test how well his software performs, he uses it to predict the wind speed for the next
days and then collects the actual wind data during these
days. He stores both his predicted data and the actual data in NumPy arrays.
To understand how well Paul's software performs, write a program to compute the maximum relative error of his prediction across these
days. HINT: Consider using numpy.ndarray.max to compute the maximum value element in an array.
The setup code gives the following variables:
Name Type Description
n int The number of days
predicted numpy.ndarray Array of length
representing the predicted wind speed for these
days
actual numpy.ndarray Array of length
representing the actual wind speed for these
days
Your code snippet should define the following variables:
Name Type Description
max_rel_error float The maximum relative error of Paul's prediction across these
days

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions