Question: In Python Find and the values of beta_0 and beta_1 that minimize ssr(y, x, beta_0, beta_1). Write a function minimize_ssr(y, x, beta_0_min, beta_0_max, beta_1_min, beta_1_max,

In Python Find and the values of beta_0 and beta_1 that minimize ssr(y, x, beta_0, beta_1). Write a function minimize_ssr(y, x, beta_0_min, beta_0_max, beta_1_min, beta_1_max, step)

A) Find values by evaluating ssr(y, x, beta_0, beta_1) over every combination of (beta_0,beta_1) in two list B) Create list beta_0_list and beta_1_list from ranges beta_0 = beta_0_min ,......., beta_0_max and beta_1 = beta_1_min ,......., beta_1_max, where the neighboring values of beta_0 and beta_1 are separated by distance step. C) Start with min_SSR = 999,999. Loop over the index numbers i and j for both list. D) For each pair of i and j extract the value beta_0_list[i]and beta_1_list[j] E) For each pair of i and j evaluate SSR, if lower than min_SSR record the new i_min= i and j_min=j and update the newest value of min_SSR. F) After the loops return [ beta_0[i_min], beta_1[j_min] ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!