Question: Question 3. [11 Machine Learning, tting a linear function to data is a very common task used to predict values for new data. Usually we

Question 3. [11 Machine Learning, tting a linear
Question 3. [11 Machine Learning, tting a linear function to data is a very common task used to predict values for new data. Usually we are given in data points in R\"_1 each of the form .r i} = {3?}, IE}, . . . , 1:21,}? and corresponding values pm and try to t a function of the form 3} = 8;: + 813:1 + - - - + El'n_1n_1 [this is called a hyperplane} to this data. This means that we are assuming that the output of the function depends linearly on n 1 different variables. Here ii is the predicted value for the data {$1, $2, . . . , .r,,_1}T. We tr},-r to minimize the following flmction [typically referred to as the SSE or Sum of Squared Errors]: he) = ee-w gm}? i=1 Note that his squared error function gives the square of the distance between the values predicted from the function and the given data points. The vector {ii = (Ba, 81,. . . ,Bn_1} is the vector of parameters for our linear model. This function is known to have a global minimum. Sometimes optimization algorithms such as Gradient Descent are used to nd the value of the parameter vector that minimizes this function. Dene the matrix A with [fillF in the 1'\" row. For ease of the solution, we define '35:} = 1 to allow for as to be the constant term in our linear model, so the rst column of A will be all ones We can nd the leastpsquarm solution as the line of best t for the given data. If ATA is invertible it is given as = (fa-1.4%: a Linear r 'on models are commonl used to predict house prices as a function of 93113551 3' square footage [and many other variables}. [1" we assume house prices follow a linear model as a function of square footage, what is the predicted house price for a 20m sqft house given that the four data points we use to train our model are {(3,1}.~{5:3}a{713}=(353}l= where the x coordinate is in units of l sqft and the y coordinate is in units of $100., Gill]. {b} Suppose radioactive substances A and B have decay constants of ll and DH? rmpec tively. If a mixture of these two substances at time t = [1 contains MFA grams of A and M3 grams of B, we can model the total amount 3,; of the mixture present at time t by y = MAEmet + Mae"mt. If MA and M5- are unknown. Find estimates for these values given the amount 3;, of the mixture at time t,- if we have the ve data points [t,-, y,] as follows: {{1,21.34},[11,20.53},[12,30115},[14,13.3T},(15,13.3D}}. Hint: There is no constant term in this model, so we do not need a column of ones. We do need two columns that you will need to build taking the exponentials of the rst entry in the data set for the two exponential functions given

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 Mathematics Questions!