INT301 Lab 4-Further Practice with Perceptrons Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

Rate this product

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.
  • Lab-of-Week-4-jtqh0c.zip