

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































Reminders
Midterm Exam
Midterm Exam
Topics for Midterm 1
SAMPLE QUESTIONS
Sample Questions 10-701 Machine Learning Midterm Exam - Page 8 of 17 11/02/ Now we will apply K-Nearest Neighbors using Euclidean distance to a binary classifi- cation task. We assign the class of the test point to be the class of the majority of the k nearest neighbors. A point can be its own neighbor. Figure 5
Sample Questions
10-601: Machine Learning Page 7 of 16 2/29/
3 Linear and Logistic Regression [20 pts. + 2 Extra Credit] 3.1 Linear regression
we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
2
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line.
new
(a) Adding one outlier to the original data set. (b) set. Dataset
is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. Figure 2: New regression lines for altered data sets Snew.
rning Page 7 of 16 2/29/
ession
put x and we want to estimate an output y, in linear regression hip between them is of the form y = wx + b + โ, where w and b are s we estimate and โ represents the noise in the data. When the noise g the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. t S plotted in Fig. 1 along with its associated regression line. For ets Snew^ plotted in Fig. 3 , indicate which regression line (relative g. 2 corresponds to the regression line for the new data set. Write e below. Dataset (a) (b) (c) (d) (e) Regression line An observed data set and its associated regression line. 10-601: Machine Learning Page 7 of 16 2/29/
3.1 Linear regression
Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. 10-601: Machine Learning Page 7 of 16 2/29/
3.1 Linear regression
Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line.
Sample Questions
10-601: Machine Learning Page 7 of 16 2/29/
3 Linear and Logistic Regression [20 pts. + 2 Extra Credit] 3.1 Linear regression
we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
2
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line.
new (a) Adding one outlier to the original data set. (b) Adding two outliers to the original data set. (c) Adding three outliers to the original data set. Two on one side and one on the other side. (d) Duplicating the original data set. Dataset
is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. Figure 2: New regression lines for altered data sets Snew.
rning Page 7 of 16 2/29/
ession
put x and we want to estimate an output y, in linear regression hip between them is of the form y = wx + b + โ, where w and b are s we estimate and โ represents the noise in the data. When the noise g the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. t S plotted in Fig. 1 along with its associated regression line. For ets Snew^ plotted in Fig. 3 , indicate which regression line (relative g. 2 corresponds to the regression line for the new data set. Write e below. Dataset (a) (b) (c) (d) (e) Regression line An observed data set and its associated regression line. 10-601: Machine Learning Page 7 of 16 2/29/
3.1 Linear regression
Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. 10-601: Machine Learning Page 7 of 16 2/29/
3.1 Linear regression
Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line.
Sample Questions
10-601: Machine Learning Page 7 of 16 2/29/
3 Linear and Logistic Regression [20 pts. + 2 Extra Credit] 3.1 Linear regression
we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
2
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line.
new (c) Adding three outliers to the original data set. Two on one side and one on the other side. (d) Duplicating the o (e) Duplicating the original data set and adding four points that lie on the trajectory of the original regression line.
Dataset
is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min
w
i=
Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. Figure 2: New regression lines for altered data sets Snew.
rning Page 7 of 16 2/29/
ession
put x and we want to estimate an output y, in linear regression hip between them is of the form y = wx + b + โ, where w and b are s we estimate and โ represents the noise in the data. When the noise g the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. t S plotted in Fig. 1 along with its associated regression line. For ets Snew^ plotted in Fig. 3 , indicate which regression line (relative g. 2 corresponds to the regression line for the new data set. Write e below. Dataset (a) (b) (c) (d) (e) Regression line An observed data set and its associated regression line. 10-601: Machine Learning Page 7 of 16 2/29/
3.1 Linear regression
Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line. 10-601: Machine Learning Page 7 of 16 2/29/
3.1 Linear regression
Given that we have an input x and we want to estimate an output y, in linear regression we assume the relationship between them is of the form y = wx + b + โ, where w and b are real-valued parameters we estimate and โ represents the noise in the data. When the noise is Gaussian, maximizing the likelihood of a dataset S = {(x 1 , y 1 ),... , (xn, yn)} to estimate the parameters w and b is equivalent to minimizing the squared error: arg min w X^ n i= (yi (wxi + b))^2. Consider the dataset S plotted in Fig. 1 along with its associated regression line. For each of the altered data sets Snew^ plotted in Fig. 3 , indicate which regression line (relative to the original one) in Fig. 2 corresponds to the regression line for the new data set. Write your answers in the table below. Dataset (a) (b) (c) (d) (e) Regression line Figure 1: An observed data set and its associated regression line.
OPTIMIZATION METHOD #3: STOCHASTIC GRADIENT DESCENT
Stochastic Gradient Descent (SGD)
Per-example objective:! "
Original objective:!^ #^ =^ % "&' ( ! "