A list,
RBF neural network is a three-layer neural network, which includes input layer, hidden layer and output layer. The transformation from input space to hidden space is nonlinear, while the transformation from hidden space to output space is linear. The flow diagram is as follows:
The basic idea of RBF network is that RBF is used as the “basis” of the hidden element to form the hidden layer space, so that the input vector can be directly mapped to the hidden space without weight connection. When the center point of RBF is determined, the mapping relationship is determined. The mapping from the hidden layer space to the output space is linear, that is, the output of the network is the linear weighted sum of the output of the hidden element, where the weight is the adjustable parameter of the network. Among them, the function of the hidden layer is to map the vector from the lower dimension P to the higher dimension H, so that the case of the lower dimension linearly indivisible can become linearly separable to the higher dimension, mainly the idea of kernel function. Thus, the network mapping from input to output is nonlinear, while the network output is linear with respect to tunable parameters. The weights of the network can be solved directly by linear equations, which greatly speeds up learning and avoids local minimum problems.
2. RBF neural network learning problem
Ii. Source code
clear
clc
I=imread('sample3.bmp'); A=GetFeature(I); % divides the image into25Function data=GetFeature(I) [row,col]=find(I==0); % return the left/right margin of the number I=I(min(row): Max (row),min(col): Max (col)); % Intercept the handwritten digital image so that it tightly contains the digital boundary and does not contain excess white space imwrite(I,'Your handwriting. BMP'.'bmp'); % Save the captured handwritten digital image [row,col]=size(I); r=fix(row/5); % for points25Block preparation c=fix(col/5);
sum=0; % Calculate the number of blank blocks k=1;
feature=[];
for i=1:r:5*r % starts at the rowfor j=1:c:5*c % keeps the rows the same and evaluates the columns firstfor m=i:i+r- 1
for n=j:j+c- 1
if I(m,n)==0
sum=sum+1; % The number of pixels per blank blockend
end
end
data(k)=sum/(r*c); % the KTH characteristic component, namely the blank rate of block K, k is maximum25
sum=0;
k=k+1;
end
function y = rbfnettest( sample )
load template pattern;
c=0;
for i=1:10
for j=1:210
c=c+1;
p(:,c)=pattern(i).feature(:,j);
end
end
Copy the code
3. Operation results
Fourth, note
Version: 2014 a