Given the following data for a binary classification problem (including a "ones column" pre-pended to the data): and ini
Posted: Tue Jul 05, 2022 10:25 am
questions. XO 1 1 1 1 X1 -3 1 0 0 -3 1 X2 Y -4 0 0 1 0 Wo W1 W2 1 0 1 -2
Part 1: Compute output of the logistic regression Assuming a threshold of 0.5, compute zi, P(yi whether the output of the classifier is correct or not. xo 1 1 X1 1 x2 Y Z 1 0 0 1 -3 1 0 -3 1 0 1 0 1 number number number number = 1|x;), and ŷ; (0 or 1) for each sample, then indicate P(y=1|x) ŷ (0 or 1) number number number number integer integer integer integer Correct? O Yes O Yes O Yes Yes O No O No O No No
Part 2: Update weights using gradient descent The logistic regression learns the coefficient vector w to minimize the binary cross-entropy loss function L(w) -£-(² i=1 = y; log the new weight vector if a = 0.2: wo Then, to minimize this loss function, the gradient descent update rule is Wk+1 = Wk + a Σ 1 1+e-(w,xi) number n L = number (3 digits after decimal) i=1 Yi W1 + (1 − y₁) log - For the data and initial weight vector given above, compute the binary cross-entry loss: L = number (3 digits after decimal) 1 1+e-(wk, xi) number 。-(w,xi) 1+e-(w,xi) and the binary cross-entropy loss for this new weight vector: W2 e number Xxi
Given the following data for a binary classification problem (including a "ones column" pre-pended to the data): and initial weights for a logistic regression: answer the following Part 1: Compute output of the logistic regression Assuming a threshold of 0.5, compute zi, P(yi whether the output of the classifier is correct or not. xo 1 1 X1 1 x2 Y Z 1 0 0 1 -3 1 0 -3 1 0 1 0 1 number number number number = 1|x;), and ŷ; (0 or 1) for each sample, then indicate P(y=1|x) ŷ (0 or 1) number number number number integer integer integer integer Correct? O Yes O Yes O Yes Yes O No O No O No No
Part 2: Update weights using gradient descent The logistic regression learns the coefficient vector w to minimize the binary cross-entropy loss function L(w) -£-(² i=1 = y; log the new weight vector if a = 0.2: wo Then, to minimize this loss function, the gradient descent update rule is Wk+1 = Wk + a Σ 1 1+e-(w,xi) number n L = number (3 digits after decimal) i=1 Yi W1 + (1 − y₁) log - For the data and initial weight vector given above, compute the binary cross-entry loss: L = number (3 digits after decimal) 1 1+e-(wk, xi) number 。-(w,xi) 1+e-(w,xi) and the binary cross-entropy loss for this new weight vector: W2 e number Xxi