Radial Basis Function Neural Networks
The following exercise can be used to model an RBF network
%Radial Basis Function Network
clear;close all;
%Generate training data (input and target)
p = [0:0.25:4];
t = sin(p*pi);
%Define and train RBF Network
net = newrb(p,t);
plot(p,t,'*r');hold;
%Generate test data
p1 = [0:0.1:4];
%Test network
y = sim(net,p1);
plot(p1,y,'ob');
legend('Training','Test');
xlabel('input, p');
ylabel('target, t');
Part 1
Revise demo.m in Week 6 lab with RBF network, to demonstrate the capability of RBF network to model the XOR logic gate.
Part 2
Demonstrate the capability of an RBF to approximate the function f(t) = sin(t)*exp(-t/20); 0 < t < 50
Implement K-means clustering algorithm for determining the centers. (Hint: you need to write the Matlab code for this part using formulae of RBF network from lecture notes, instead of directly using newrb and sim functions.)



