Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB assignment #12 Make a simple classifier neural network using the delta rule. This model has four input nodes and two output nodes. It must
MATLAB assignment #12 Make a simple classifier neural network using the delta rule. This model has four input nodes and two output nodes. It must learn how to map four particular input patterns to four particular output patterns. The delta rule allows it to compare its actual output on any given trial with the target (or correct) output, and use that difference (error signal) to adjust the weights appropriately. Translate from English into Matlab: clear all variables introduce a variable that will record how many training trials take place; call it "epochs", and set it at zero. introduce a matrix of four horizontal input vectors (call it "Inputs"): 1000 input pattern 1 0100 input pattern 2 0010 input pattern 3 000 1 input pattern 4 introduce a matrix of four horizontal target output vectors (call it "Targets"): 1 0 target output pattern 1 1 0 target output pattern 2 0 1 target output pattern 3 0 1 target output pattern 4 make a 4,2 matrix of random weights between -1 and 1; call it "W". introduce a variable that will record the mean squared error of the model's performance; set its value at a very high number at first. call it "mse". introduce a variable that will determine the learning rate (fast or slow). set it at .1 for starters, and call it "Lrate" Start a "while loop" that will continue as long as mse is greater than .05. increment the value of "epochs" by 1 for each iteration of the loop. MATLAB assignment #12 Make a simple classifier neural network using the delta rule. This model has four input nodes and two output nodes. It must learn how to map four particular input patterns to four particular output patterns. The delta rule allows it to compare its actual output on any given trial with the target (or correct) output, and use that difference (error signal) to adjust the weights appropriately. Translate from English into Matlab: clear all variables introduce a variable that will record how many training trials take place; call it "epochs", and set it at zero. introduce a matrix of four horizontal input vectors (call it "Inputs"): 1000 input pattern 1 0100 input pattern 2 0010 input pattern 3 000 1 input pattern 4 introduce a matrix of four horizontal target output vectors (call it "Targets"): 1 0 target output pattern 1 1 0 target output pattern 2 0 1 target output pattern 3 0 1 target output pattern 4 make a 4,2 matrix of random weights between -1 and 1; call it "W". introduce a variable that will record the mean squared error of the model's performance; set its value at a very high number at first. call it "mse". introduce a variable that will determine the learning rate (fast or slow). set it at .1 for starters, and call it "Lrate" Start a "while loop" that will continue as long as mse is greater than .05. increment the value of "epochs" by 1 for each iteration of the loop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started