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
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