文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 外语学习 > 英语学习 > COMP3308_Introduction to Artifical Intelligence_2014 Semester 1_Tutorial_w7-solutions
侵权投诉

COMP3308_Introduction to Artifical Intelligence_2014 Semester 1_Tutorial_w7-solutions

University of Sydney_COMP3308_Introduction to Artifical Intelligence_2014 Semester 1

COMP3308/3608 Artificial Intelligence

Week 7 Tutorial exercises Decision trees. Perceptrons.

Perceptron learning rule (Homework) Given is the following training set:

input output ex. 1: 1 0 0 1 ex. 2: 0 1 1 0 ex. 3: 1 1 0 1 ex. 4: 1 1 1 0 ex. 5: 0 0 1 0 ex. 6: 1 0 1 1

a) Train by hand a perceptron with a bias on this training set. Assume that all initial weights (including the bias of the neuron) are 0. Show the set of weights (including the bias) at the end of each iteration. Apply the examples in the given order.

Stopping criteria: all examples are correctly classified or a maximum number of 2 epochs is reached. Reminder: the stopping criteria are checked at the end of each epoch; to check the first part, apply each training example, check if it is correctly classified and stop if all examples are correctly classified. Note that when doing this, there is no weight change just calculating the actual output and comparing it with the target output.

Use the step function and note that step(0)=1. step(n) = 1, if n >= 0 = 0, otherwise.

b) Which stopping condition was satisfied? If it was the first one, how many epochs were needed?

Solution:

a) starting point: w=[0 0 0], b=0 iteration 1:

applying ex.1: p1= [1 0 0]T,t1=1 a=step([0 0 0][1 0 0]T+0)=step(0)=1 e=t1-a=1-1=0

wnew=[0 0 0]+0[1 0 0]T =[0 0 0] bnew= 0+0=0

i.e. no change in w and b as e=0 iteration 2:

applying ex.2: p2= [0 1 1]T,t2=0 a=step([0 0 0][0 1 1]T+0)=step(0)=1 e=t2-a=0-1=-1

wnew=[0 0 0]+(-1)[0 1 1]T =[0 -1 -1] bnew= 0+(-1)=-1

i.e. w an b have been updated Similarly:

第1页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email