disc12-examprep

pdf

School

Hong Kong Polytechnic University *

*We aren’t endorsed by this school

Course

273

Subject

Computer Science

Date

Nov 24, 2024

Type

pdf

Pages

3

Uploaded by lixun73230

Report
CS 188 Spring 2023 Introduction to Artificial Intelligence Exam Prep 12 Q1. Linear Separability (a) For each of the datasets represented by the graphs below, please select the feature maps for which the perceptron algorithm can perfectly classify the data. Each data point is in the form ( ? 1 , ? 2 ) , and has some label ? , which is either a 1 (dot) or −1 (cross). (i) [ ? 1 ? 2 1 ] [ ? 1 ? 2 ? 2 1 ] [ ? 1 ? 2 | ? 1 | ] [ ? 1 ? 2 ? ] [ ? 1 ? 2 ] (ii) [ ? 1 ? 2 1 ] [ ? 1 ? 2 ? 2 1 ] [ ? 1 ? 2 | ? 1 | ] [ ? 1 ? 2 ? ] [ ? 1 ? 2 ] (iii) [ ? 1 ? 2 1 ] [ ? 1 ? 2 ? 2 1 ] [ ? 1 ? 2 | ? 1 | ] [ ? 1 ? 2 ? ] [ ? 1 ? 2 ] 1
Q2. Deep Learning (a) Perform forward propagation on the neural network below for ? = 1 by filling in the values in the table. Note that (i), , (vii) are outputs after performing the appropriate operation as indicated in the node. (i) (ii) (iii) (iv) (v) (vi) (vii) ? 2 3 4 max min max (i) (ii) (iii) (iv) (v) (vi) (vii) (b) [Optional] Below is a neural network with weights ?, ?, ?, ?, ?, ? . The inputs are ? 1 and ? 2 . The first hidden layer computes ? 1 = max( ? ? 1 + ? ? 2 , 0) and ? 2 = max( ? ? 1 + ? ? 2 , 0) . The second hidden layer computes ? 1 = 1 1+exp(− ? ? 1 ) and ? 2 = 1 1+exp(− ? ? 2 ) . The output layer computes ? = ? 1 + ? 2 . Note that the weights ?, ?, ?, ?, ?, ? are indicated along the edges of the neural network here. Suppose the network has inputs ? 1 = 1 , ? 2 = −1 . The weight values are ? = 1 , ? = 1 , ? = 4 , ? = 1 , ? = 2 , ? = 2 . Forward propagation then computes ? 1 = 2 , ? 2 = 0 , ? 1 = 0 . 9 , ? 2 = 0 . 5 , ? = 1 . 4 . Note: some values are rounded. ? 1 ? 2 ? 1 ? 2 ? 1 ? 2 ? ? ? ? ? ? ? Using the values computed from forward propagation , use backpropagation to numerically calculate the following partial derivatives. Write your answers as a single number (not an expression). You do not need a calculator. Use scratch paper if needed. Hint: For ? ( ? ) = 1 1+exp(− ? ) , the derivative is 𝜕? 𝜕? = ? ( ? )(1 − ? ( ? )) . 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 𝜕? 2
(c) Below are two plots with horizontal axis ? 1 and vertical axis ? 2 containing data labelled × and . For each plot, we wish to find a function ? ( ? 1 , ? 2 ) such that ? ( ? 1 , ? 2 ) 0 for all data labelled × and ? ( ? 1 , ? 2 ) < 0 for all data labelled . Below each plot is the function ? ( ? 1 , ? 2 ) for that specific plot. Complete the expressions such that all the data is labelled correctly. If not possible, mark “No valid combination”. ? ( ? 1 , ? 2 ) = max( (i) + (ii) , (iii) + (iv) ) + (v) (i) *$ ? 1 *$ ? 1 *$ 0 (ii) *$ ? 2 *$ ? 2 *$ 0 (iii) *$ ? 1 *$ ? 1 *$ 0 (iv) *$ ? 2 *$ ? 2 *$ 0 (v) *$ 1 *$ −1 *$ 0 *$ No valid combination ? ( ? 1 , ? 2 ) = (vi) − max( (vii) + (viii) , (ix) + (x) ) (vi) *$ ? 2 *$ ? 2 *$ 0 (vii) *$ ? 1 *$ ? 1 *$ 0 (viii) *$ ? 2 *$ ? 2 *$ 0 (ix) *$ ? 1 *$ ? 1 *$ 0 (x) *$ ? 2 *$ ? 2 *$ 0 *$ No valid combination 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help