Talking about RBF Neural Network

2020/04/13 12:40
Reading 577


brief introduction


Nowadays, the technology of artificial intelligence is advancing rapidly. As one of the widely spread algorithms, RBF neural network algorithm can quickly realize functions such as function approximation, data clustering, pattern classification, optimization calculation, etc. Its radial basis function neural network structure is widely used in the research of financial field. The algorithm structure is shown below:

RBF neural network is composed of three layers, The input layer to the hidden layer is a nonlinear spatial transformation, and the Gaussian function of the radial basis function is generally used for operation; The transformation from hidden layer to output layer is linear space transformation, that is, the transformation between matrices.


algorithm

When RBF neural network performs data operation, it needs to confirm the location of the cluster center point and the weight from the hidden layer to the output layer. Usually, K-means clustering algorithm or minimum orthogonal quadratic method is used to train a large number of data to obtain the cluster center matrix and weight matrix. In general, the location of the center point of the least orthogonal quadratic clustering is given, so it is more suitable for data with relatively regular distribution. The K-means clustering algorithm will independently select the cluster center and conduct unsupervised classification learning, thus completing the spatial mapping relationship. This paper gives a brief introduction to K-means clustering algorithm.


K-means clustering algorithm


1.  Network initialization, randomly select h training samples as the cluster center ci.

2. Group the input training sample set according to the nearest neighbor rule, and assign xn to each cluster set of the input sample according to the Euclidean distance between xn and ci.

3. Readjust the cluster center, calculate the average value of training samples in each cluster set, and generate a new cluster center ci until the cluster center no longer changes. The obtained ci set is the base function center set, otherwise return to 2 iterations for solution.

4. Solve variance (Cmax is the maximum radial basis center distance in the set)  

5. Calculate the set of weight W.

6. Find the output result set.



Python Implementation of RBF Neural Network

1. Import numpy and math libraries for algorithm construction.

2. Realize clustering center and weight algorithm:

3. Data training:


Data training

1. The training data input is in the form of matrix, as follows:

[param1 param2 ... paramN result]

N explanatory variables correspond to one explained variable.


2. When predicting output, the matrix form of input data is as follows:

[param1 param2 ... paramN]

The result set is generated by the algorithm.

END






Scan the code to follow us

This article is shared from the WeChat official account Sogou QA.
In case of infringement, please contact support@oschina.cn Delete.
Participation in this article“ OSC Source Innovation Plan ”, welcome you to join us and share with us.

Expand to read the full text
Loading
Click to lead the topic 📣 Post and join the discussion 🔥
Reward
zero comment
zero Collection
zero fabulous
 Back to top
Top