Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN CS440 ..., Lecture notes of Artificial Intelligence

UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN. CS440/ECE448 Artificial Intelligence. Exam 1. Spring 2022. February 21, 2022. Your Name: Your NetID:.

Typology: Lecture notes

2022/2023

Uploaded on 05/11/2023

aasif
aasif 🇺🇸

4.9

(7)

1 document

1 / 9

Toggle sidebar

Related documents


Partial preview of the text

Download UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN CS440 ... and more Lecture notes Artificial Intelligence in PDF only on Docsity! UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN CS440/ECE448 Artificial Intelligence Exam 1 Spring 2022 February 21, 2022 Your Name: Your NetID: Your Section: Instructions • Please write your name on the top of every page. • This will be a CLOSED BOOK, CLOSED NOTES exam. You are permitted to bring and use only one 8.5x11 page of hand-written notes, front and back. • No electronic devices (phones, tablets, calculators, computers etc.) are allowed. • No calculators are permitted. You need not simplify explicit numerical expressions. 1 Name: Page 2/9 Possibly Useful Formulas Probability: P(B = 1|A = 1) = P(A = 1,B = 1) P(A = 1) Naı̈ve Bayes: P(X = x|Y = y)≈ n ∏ i=1 P(W = wi|Y = y) Laplace Smoothing: P(w) = Count(w)+ k ∑w Count(w)+ k(1+∑w 1) Perceptron: ~wy = ~wy +η~x, ~w f (~x) = ~w f (~x)−η~x Linear Regression w/SGD: ~w← ~w− η 2 ∇~wε 2 i = ~w−ηεi~xi Logistic Regression:∇~wcLi = ∇~wc ( − ln e~w T ci ~xi ∑k e~w T k~xi ) = ( e~w T ci ~xi ∑k e~w T k~xi − yi,c ) ~xi Neural Net: ξ (l) j = b(l)j +∑ k w(l) j,kh(l−1) k , h(l)j = g(l) ( ξ (l) j ) Back-Propagation: ∂L ∂h(l−1) k = ∑ j ∂L ∂h(l)j ∂h(l)j ∂h(l−1) k Pinhole Camera: x′ f =−x z , y′ f =−y z CS440/ECE448 Artificial Intelligence Exam 1 February 21, 2022 Name: Page 5/9 Question 3 (7 points) Describe, in one sentence each, the purpose of (1) a training set, (2) a development test set, (3) an evaluation test set. Solution: A training set is used to train the model parameters. A development test set is used to compare many different fully-trained models; we choose the one with the best performance on the development test set. An evaluation test set is used to estimate how well the chosen model will perform in the real world. CS440/ECE448 Artificial Intelligence Exam 1 February 21, 2022 Name: Page 6/9 Question 4 (7 points) You’re trying to create a multi-class perceptron that will classify animals as being either fish, birds, or reptiles. Your feature vector is~x = [x1,x2,x3,1]T , where x1 = fraction of time the animal spends under water x2 = fraction of time the animal spends on land x3 = fraction of time the animal spends flying • Based on your extensive prior knowledge of zoology, you initialize your perceptron with the fol- lowing weight vectors: ~wfish = [1,0,0,0]T , ~wreptile = [0,1,0,0]T , and ~wbird = [0,0,1,0]T . • Your first training token is a crocodile, for which y =reptile, and~x = [0.7,0.3,0,1]T . After training with this training token, what are the numerical values of ~wfish, ~wreptile, and ~wbird? Assume a learning rate of η = 1. Solution: ~wfish = [0.3,−0.3,0,−1]T ~wreptile = [0.7,1.3,0,1]T ~wbird = [0,0,1,0]T CS440/ECE448 Artificial Intelligence Exam 1 February 21, 2022 Name: Page 7/9 Question 5 (7 points) In stochastic gradient descent, we train using one training token at a time. Suppose L = (~wT~x− y)2 ~w =  w1 w2 b  , ~x =  x1 x2 1  In terms of~x, ~w, w1, w2, b, x1, x2, and/or y, what is dL dw2 ? Solution: dL dw2 = 2(~wT~x− y)x2 CS440/ECE448 Artificial Intelligence Exam 1 February 21, 2022
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved