Professional Documents
Culture Documents
Neural Networks
10/27/2004 1
Radial Basis Functions
φ(r)
0.5
– Output falls off rapidly (→ 0) 0.25
0
as input points move away
from the center (i.e., as r -2 -1 0 1 2
increases) r
10/27/2004 3
1st-Layer Functionality
• Example: X-OR Problem
p1 p2 X-OR
0 0 0
0 1 1
1 0 1
p2 1 1 0 φ2
1 1
p1 φ1(r1)
Layer 1
p2
(2 neurons)
0 p1 φ2(r2) 0 φ1
0 1 0 1
10/27/2004 4
1st Layer Architecture
Example: 2 Inputs, 2 Neurons
r1 ⎧⎪ − r12 ⎫⎪
distance Φ1 (r1 ) = exp⎨ 2 ⎬ φ1
p1 from p to C1 ⎪⎩ 2σ 1 ⎪⎭
Perceptron
or ADALINE
r2 ⎧⎪ − r22 ⎫⎪ Network
p2 distance
from p to C2
Φ 2 (r2 ) = exp⎨ 2 ⎬ φ2
⎪⎩ 2σ 2 ⎪⎭
φ2
• Plot resulting points (φ1, φ2)
1
0.8
(Linearly Separable) 0.6 X-OR = 0
0.4 X-OR = 1
0.2
0 φ1
10/27/2004 7
0 0.2 0.4 0.6 0.8 1
Problems with X-OR Example
• # of neurons in the hidden layer, the centers of the neurons, and the
radius (σ) of the RBF’s were assumed known
• Training of the RBF (i.e., finding the centers of the clusters) can be
done via
– the k-means Clustering Algorithm; or
– the Kohonen Algorithm (types of unsupervised
learning)
• We will use k-means Clustering, where the number of clusters, k, is
set in advanced
* Since, in traditional NN’s, the weights are the parameters that must be learned,
the centers are sometimes called the weights of RBF neurons.
10/27/2004 8
k-Means Clustering Algorithm
1. Randomly choose k points from the input training data to be initial
cluster centers
2. For each training data point, find the distance to each of the k
cluster centers
3. Choose the closest center for each training data point, and assign
the corresponding cluster number from 1 to k for the data point.
• P-nearest-neighbor algorithm:
10/27/2004 10
Practice Problem: k-Means Clustering, k = 5
3 p2 0 6
2
1
0 p3 3 3
0 1 2 3 4 5 6 p4 5 0
p1 p5 0 0
p6 2 2
Step 1: k = 5 randomly selected
cluster centers: C1 = p1, …, C5 = p5 p7 5 5
10/27/2004 11
K-Means Clustering, Steps 2 -4
(2 Iterations)
distances new ave.
1st Iteration i Ci(x) Ci(y) p1 p2 p3 (3,3) p4 p5 p6 (2,2) p7 (5,5)
1 0 5 0 1
2 0 6 0
3 3 3 0 * * (10/3,10/3)
4 5 0 0
5 0 0 0
2nd Iteration 1 0 5 0 1
2 0 6 0
3 3.33 3.33 * * *
4 5 0 0
5 0 0 0
10/27/2004 Done 12
Finding the Radius (σ) for Each
Neuron/Cluster
i Ci(x) Ci(y) C1 C2 C3 C4 C5
3 3.33 3.33 13.89 18.22 0 13.89 22.22 C1, C4 13.89 3.73 27.78
10/27/2004 13
1st Layer of RBF Network
for the Practice Problem
(0,5)
d(p, C1)
r1
{
Φ1 (r1 ) = exp − r12 / 14.9} φ1
(0,6)
d(p, C2)
r2
{ }
Φ 2 (r2 ) = exp − r22 / 19.2 φ2
10/27/2004 14
Outputs from Layer 1 = Inputs for Layer 2
10/27/2004 16
Layer 2: Perceptron or ADALINE
Single Multiple-Input Neuron
Input
p
W
5x1 n a
Perceptron 1x5
+ hardlim
1 1x1 1x1
b
5 1x1 a = hardlim(Wp + b)