Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer part B of the question. Part A is included for reference! 2 Linear Regression We investigate the solution of regression. For simplicity, we
Please answer part B of the question. Part A is included for reference!
2 Linear Regression We investigate the solution of regression. For simplicity, we have only one feature x to predict y. Suppose we are given samples (21,41), ..., un, yn). wo, wi are parameters, and we are to find parameters that best fit the following relation: Wo + wil'i = yi. (a) Centering. (5 pts] Let = Li=1 Xi and x = ri - . '; are called centered since 21-12'4 = 0. Let i be the values predicted by Di, wo, w1: i = wo + w1.2. Show that y can be predicted by c as well. That is, there are parameters wo, w such that i = wo + wc, and write wo, w in terms of wo, w1, and , but not Di. ti, ti =Ii - , therefore, I; = x + Answer: We know, yi = wo + w1.0i and i = (1) put x; = x' + @ in the above equation ti = 10 + 01(c+t) i = wo + wir' + w i = wote n + i = w + wir w = wo + wc Note: = w = wi .ci (mean of feature x) (b) Loss function. [5 pts] In (a), we converted linear regression on I, with parameters wo, w1 to linear regression on x with ww. Write the loss functions of the both. Specifically, let's assume J is the loss function of the former, and J' is of the latter. 2 Linear Regression We investigate the solution of regression. For simplicity, we have only one feature x to predict y. Suppose we are given samples (21,41), ..., un, yn). wo, wi are parameters, and we are to find parameters that best fit the following relation: Wo + wil'i = yi. (a) Centering. (5 pts] Let = Li=1 Xi and x = ri - . '; are called centered since 21-12'4 = 0. Let i be the values predicted by Di, wo, w1: i = wo + w1.2. Show that y can be predicted by c as well. That is, there are parameters wo, w such that i = wo + wc, and write wo, w in terms of wo, w1, and , but not Di. ti, ti =Ii - , therefore, I; = x + Answer: We know, yi = wo + w1.0i and i = (1) put x; = x' + @ in the above equation ti = 10 + 01(c+t) i = wo + wir' + w i = wote n + i = w + wir w = wo + wc Note: = w = wi .ci (mean of feature x) (b) Loss function. [5 pts] In (a), we converted linear regression on I, with parameters wo, w1 to linear regression on x with ww. Write the loss functions of the both. Specifically, let's assume J is the loss function of the former, and J' is of the latterStep 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