PDA

查看完整版本 : [MATLAB基础] 求助!学校 matlab 的题目


zmuma
2012-12-09, 11:33
It is required train a Perceptron used to represent the brightness of an image in such a way that if it outputs a 1, the image is as considered as bright, and if it outputs a -1, the image is considered as dark.

A 2x2 black and white pixel image is considered as bright if it has two or more white pixels in it. The pixels are x1 to x4, as given below.

图1

For example, the input values for the following image are x1 = -1, x2=1, x3=1 and x4 = -1
图2

A black pixel will produce an input of -1 to the neural network, and a white pixel will give an input of +1. The threshold is considered as an input node and hence the network will have five input nodes. The weight values are between -1 and 1 and the a learning rate of η = 0.2.

Provide a Perceptron neural network and Train the Perceptron

(i) For one set of training data manually and

For all the sets of training data Using MATLAB (for all the 16 data sets).