Forum

AI4I-4-Quiz anybody...
 
Notifications
Clear all

AI4I-4-Quiz anybody knows this question's answer?  

   RSS

0

during the quiz for module 4, have no clue on this question

 

You want to study if there exists a correlation between the pay rate and the employee engagement. To improve your confidence in the calculation, you decide to apply bootstrapping before calculating the replicate. Complete the function below:

def draw_bs_pairs (x, y, func, size=1):
  # Set up array of indices
  inds = np.arange(len(x))
  # Initialize the array of replicates
  bs_rep= np.empty(size)
  for i in range(size):
    bs_inds = np.random.(inds, size = len(inds))
    bs_x = x[bs_inds]
    bs_y = y[bs_inds]
    bs_rep[i] = func( )   # this is where I get stuck!!!!! any idea??
  return bs_rep

PS. indent is an issue... but can guess what the code is trying to do

This topic was modified 6 months ago 2 times by Yi Sheng
Topic Tags
2 Answers
0

Hi @quemaster.

The question has been reviewed and the formatting has been fixed and the requirement has been adjusted as it required a too specific answer. We apologise for you inconvenience and we are constantly looking to improve the content.

0

Thx Yi Sheng~

 

I have already figured out the answer recently and got the quiz passed

 

Que

Share:

Delete your account