Advances in Applied Mathematics
Vol. 08  No. 08 ( 2019 ), Article ID: 31804 , 4 pages
10.12677/AAM.2019.88169

Analysis of the Effect of BP Neural Network on Function Approximation

Jiabo She, Yanxiang Tan

School of Mathematics and Statistics, Changsha University of Science and Technology, Changsha Hunan

Received: July 31st, 2019; accepted: August 15th, 2019; published: August 22nd, 2019

ABSTRACT

The multi-layer network based on backward propagation algorithm is also called BP network. Because it is easy to implement, it is the most widely used neural network. This paper mainly studies the application of BP network based on MATLAB in function approximation, and analyzes the influencing factors of its function approximation effect. The research results show that the artificial neural network increases with the number of hidden layers, and the function approximation error decreases. As the number of hidden layer elements increases, the function approximation error decreases, and the error reduction rate gradually decreases. As the training accuracy decreases, the function approximation error decreases, the decrease rate gradually decreases, and the number of convergence steps increases.

Keywords:BP Neural Network, Function Approximation, MATLAB

神经网络实现函数逼近的影响因素分析

佘嘉博,谭艳祥

长沙理工大学数学与统计学院,湖南 长沙

收稿日期:2019年7月31日;录用日期:2019年8月15日;发布日期:2019年8月22日

摘 要

基于向后传播算法的多层网络又称BP网络,因其易于实现,是目前应用最广的一种神经网络。本文主要研究基于MATLAB的BP网络在函数逼近的应用,分析其函数逼近效果的影响因素。经本文研究表明,人工神经网络随隐层层数增加,函数逼近误差减小,随隐层单元数增加,函数逼近误差减小,误差减小速率逐渐减慢。随训练精度减小,函数逼近误差减小,减小速率逐渐减慢,同时收敛步数增加。

关键词 :BP神经网络,函数逼近,MATLAB

Copyright © 2019 by author(s) and Hans Publishers Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY).

http://creativecommons.org/licenses/by/4.0/

1. 引言

人工神经网络是在现代神经科学的发展基础之上提出的一个研究方向,目的在于反映人脑的结构和功能特性的一种独特的数学模型。在上世纪80年代,人工神经网络取得了重大突破,相关理论已经发展成为了交叉学科,它在模糊控制、自动化等方面得到广泛的应用,推出了四十余种相关的神经网络模型。

2. 神经网络结构

人工神经元与生物神经元相类似,是基本的信号处理单元。它接受其他神经元的输出并作为其输入,并且产生一个输出,输入到另一个神经元,具体结构如图1 [1] 。

Figure 1. Neuron model of the basic unit of artificial neural network

图1. 人工神经网络基本单元的神经元模型

人工神经网络基本要素:

1) 一组连接,连接的强度由连接上的值来表示。

2) 一个求和单元,用于求各输入信号的线性组合。

3) 一个非线性激活函数,将神经元的输出的幅度限制于特定范围内。

3. 函数逼近影响因素

1) 隐层层数。在训练精度为0.0005,训练次数为5000,隐层单元数均取5个,训练函数取trainlm,传递函数为tansig/purelin情况下,依次设置1、2、3层隐层,同时传递函数取tansig,以此研究隐层层数对函数逼近的效果的影响 [2] 。

2) 隐层单元数。在训练精度为0.0005,训练次数为5000,训练函数取trainlm,传递函数为tansig/purelin情况下,隐层层数为1情况下,依次设置1、2、3、4、5、6、7、8个隐层单元数,以此研究隐层单元数对函数逼近的效果的影响情况。

3) 训练精度。在训练次数为5000时,隐层单元数取5个,训练函数取 trainlm,传递函数为tansig/purelin,隐层层数为1情况下,依次设置0.5、0.05、0.005、0.0005、0.00005的训练精度,研究训练精度对函数逼近效果的影响。

4) 训练次数。在训练精度为0.0005时,隐层单元数取5个,训练函数取trainlm,传递函数为tansig/purelin,隐层层数为1情况下,依次设置100、500、1000次训练次数,研究训练次数对函数逼近效果的影响。

4. 结果分析

分析隐层层数时涉及传递函数、隐层单元数的变化,由于本实验仅考虑隐层层数对函数逼近效果的影响,因此取各隐层单元数均为5,同时传递函数均选取为tansig。

训练精度为0.0005,训练次数为5000时,隐层单元数取5个,训练函数取trainlm,传递函数为tansig/purelin情况下,依次设置1、2、3层隐层,实验结果如表1

Table 1. Data table of the effect of hidden layer number on function approximation

表1. 隐层层数对函数逼近效果影响的数据表

在训练精度为0.0005,训练次数为5000,训练函数取trainlm,传递函数为tansig/purelin情况下,隐层层数为1情况下,依次设置1、2、3、4、5、6、7、8个隐层单元数,实验结果如表2

Table 2. Data table of the influence of the number of hidden layer units on the function approximation effect

表2. 隐层单元数对函数逼近效果影响的数据表

在训练次数为5000时,隐层单元数取5个,训练函数取trainlm,传递函数为tansig/purelin,隐层层数为1情况下,依次设置0.5、0.05、0.005、0.0005、0.00005 的训练精度,实验结果如表3

Table 3. Data table of the effect of training accuracy on function approximation

表3. 训练精度对函数逼近效果影响的数据表

训练精度为0.0005时,隐层单元数取5个,训练函数取trainlm,传递函数为tansig/purelin,隐层层数为1情况下,依次设置100、500、1000次训练次数,实验结果如表4

Table 4. Data table of the effect of training times on function approximation

表4. 训练次数对函数逼近效果影响的数据表

5. 结论

经本文研究表明,人工神经网络随隐层层数增加,函数逼近误差减小,随隐层单元数增加,函数逼近误差减小,误差减小速率逐渐减慢。随训练精度减小,函数逼近误差减小,减小速率逐渐减慢,同时收敛步数增加。在收敛步数等于训练次数时,随训练次数增加,函数逼近误差减小。

文章引用

佘嘉博,谭艳祥. 神经网络实现函数逼近的影响因素分析
Analysis of the Effect of BP Neural Network on Function Approximation[J]. 应用数学进展, 2019, 08(08): 1453-1456. https://doi.org/10.12677/AAM.2019.88169

参考文献

  1. 1. 王丽萍. 基于BP神经网络的工具箱实现函数逼近[J]. 湖南农机, 2011, 38(9): 29-31.

  2. 2. 曹旭帆, 叶舟, 万俊, 等. 基于BP神经网络的函数逼近实验及MATLAB实现[J]. 实验室研究与探索, 2008, 27(5): 34-38.

期刊菜单