School of Computing and Information Systems The University of Melbourne
COMP90049 Introduction to Machine Learning (Semester 1, 2022) Week 7
1. What is gradient descent? Why is it important?
2. What is Logistic Regression? What is “logistic”? What are we “regressing”?
Copyright By PowCoder代写 加微信 powcoder
3. In following dataset each instance represents a news article. The value of the features are counts of selected words in each article. Develop a logistic regression classifier to predict the class of the article (fruit vs. computer). 𝑦” = 1 (fruit) and 𝑦” = 0 (computer).
ID apple ibm lemon TRAINING INSTANCES
TEST INSTANCES
5 1FRUIT 2 1FRUIT 1 1FRUIT 0 0 COMPUTER 7 0 COMPUTER
For the moment, we assume that we already have an estimate of the model parameters, i.e., the weights of the 4 features (and the bias 𝜃!) is 𝜃’ = [𝜃!, 𝜃”, 𝜃#, 𝜃$, 𝜃%] = [0.2, 0.3, −2.2, 3.3, −0.2].
(i). Explain the intuition behind the model parameters, and their meaning in relation to the features
(ii). Predict the test label.
(iii). Recall the conditional likelihood objective
−logL(𝛽)= −+y! log-𝜎(𝑥!;𝛽)1+(1−𝑦!)log-1− 𝜎(𝑥!;𝛽)1 !#$
Design a test to make sure that the Loss of our model, is lower when its prediction the correct label for test instance T, than when it’s predicting a wrong label.
4. For the model created in question 3, compute a single gradient descent update for parameter 𝜃” given the training instances given above. Recall that for each feature j, we compute its weight update as
𝜃& ← 𝜃& −𝜂2(𝜎(𝑥’;𝜃)− 𝑦’)𝑥’& ‘
Summing over all training instances i. We will compute the update for 𝜃 assuming the
current parameters as specified above, and a learning rate 𝜂 = 0.1.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com