AI4I-4-Quiz anybody knows this question's answer?
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
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??
PS. indent is an issue... but can guess what the code is trying to do
Thx Yi Sheng~
I have already figured out the answer recently and got the quiz passed