Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q 3 . The promises and pitfalls of randomization in sequence prediction ( 2 5 points ) . We have learned in class that the
Q The promises and pitfalls of randomization in sequence prediction
points We have learned in class that the weighted majority algorithm WMA and the
randomized weighted majority algorithm RWMA share some key similarities: both of
them place weights on experts that become lower as experts make more inaccurate forecasts.
The key difference arises in how the algorithms aggregate the weights to make a prediction:
while WMA deterministically goes with the majority vote, RWMA randomizes its prediction
proportional to the weight on each expert. In this problem, you will implement both algo
rithms in code and examine the implications of randomization on an "easy", ie predictable
sequence and a "hard", ie unpredictableadversarial sequence.
a points Use the starter code provided in the Jupyter notebook Qipynb" to
implement the WMA and RWMA algorithms with the parameter choice for
an arbitrary sequence dots, Your code for each algorithm should consist of
components: i the prediction rule or prediction probability in the case of RWMA
at round ii the evaluation of loss or mistakes, iii the weight update from round
to round
b points Use your starter code to return the sequence of cumulative mistakes up to
round ie as a function of where ranges from to for the
"easy" and "hard" sequences, which are preloaded into the Jupyter notebook. Plot
as a function of for each sequence comparing WMA and RWMA. You should
return two plots, one comparing WMA and RWMA for the easy sequence and the
other comparing WMA and RWMA for the hard sequence.
c points Which algorithm is better for the easy sequence and which algorithm is
better for the hard sequence?
d points Write code to calculate the eventual regret for WMA and RWMA for
the easy and hard sequence respectively. Which algorithm incurs a lower regret for
each case? Suppose Nature gave you the easy sequence with probability and the
hard sequence with probability Should you use the randomized WMA or WMA?
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