[Solved] INT301 Lab 4-Further Practice with Perceptrons

$25

File Name: INT301_Lab_4_Further_Practice_with_Perceptrons.zip
File Size: 433.32 KB

SKU: [Solved] INT301 Lab 4-Further Practice with Perceptrons Category: Tag:
5/5 - (1 vote)

Further Practice with Perceptrons

Demo:

Analyze the given program PerceptronExample, which consists of following parts:

  1. (1) Prepare mydata by generating 2 dimensional linearly separable data.
            mydata = rand(500,2);
            % Separate the data into two classes
            acceptindex = abs(mydata(:,1)-mydata(:,2))>0.012;        mydata = mydata(acceptindex,:); % data        myclasses = mydata(:,1)>mydata(:,2); % labels
           [m n]=size(mydata);

    You may check the data distribution using:

              scatter(mydata(:,1),mydata(:,2))
  2. (2) Train the perceptron by calling the function PerceptronTrn with the prepared training data (x, y), which will return the connection weights, the bias, and the number of iteration;
  3. (3) Test the trained Perceptron model with the testing data (xt, yt), by calling another function PerceptronTst, which will return the testing error;
  4. (4) Display the two classes of data points with a separating line.

Exercise:

  1. (1) The Perceptron training function uses a learning rate 0.5 and a threshold 0.5. Change these two parameters, e.g. learning rate 0.1 and threshold 0, and observe the differences;
  2. (2) Revise the program to calculate the Root-Mean-Square (RMS) error for every input data points and display the error curve, i.e. RMS vs. iteration.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] INT301 Lab 4-Further Practice with Perceptrons[Solved] INT301 Lab 4-Further Practice with Perceptrons
$25