Press "Enter" to skip to content

神经网络:基于模糊神经网络(Fuzzy Neural Networks,FNN)的数据预测(提供MATLAB代码)

本站内容均来自兴趣收集,如不慎侵害的您的相关权益,请留言告知,我们将尽快删除.谢谢.

一、模糊神经网络FNN

 

模糊神经网络(Fuzzy Neural Networks,FNN)结合了神经网络系统和模糊系统 的长处,它在处理非线性、 模糊性 等问题上有很大的优越性,在 智能信息处理 方面存在巨大的潜力。原理参考:

 

MATLAB模糊神经网络的预测算法–预测水质 – 知乎 (zhihu.com)

 

二、数值实验

 

2.1数据集

 

部分训练数据的输入:

 

0.8014998342057620.3000527895464010.7121161597128190.5051739344895970.2698352162034870.422017860908468
0.05165979704336770.3975360445325100.01516977737895050.4604334000426670.7627432926037880.787061088410531
0.8765489403606820.8619351851778510.3650938922739490.5861355989580220.2247784946205400.554578995436846
0.2468022409671800.5046729720476520.5172630565903660.4801558159932600.5811451694069630.439724657458223
0.9286752982797420.4439456101727760.2972801535193980.1323037279391710.9083310330758100.173794595353632
0.1558079755747100.4213394262330550.2215807391155310.5708593071052690.2442084338899600.462680953115857
0.7043830364755270.2525864150320970.8808897206950850.9269753208525750.04213648605779340.230255790744651
0.1102736644624810.4040747745973670.6774372234504090.5426249490255580.8467195524716350.322927110310954
0.4571775616575800.7396875663923570.1021690314296990.5628154318163570.4149862720012470.732646838748673
0.8149116212270100.6454026081721970.2345870409940290.1664909238219760.2391195132512560.754343218035203
0.3649968694459250.9294097267895140.9791830832185680.06107013362478650.5502939571863520.858071763476749
0.06533700208459370.4408539480160980.4239814150970730.1396591899431510.3510524660834210.639386810344331
0.2182473028103370.2716234653585960.8567884001297570.2113934494305600.4729423127581830.628091161779686
0.4379133814435220.7669244162233520.4418822071176450.6769833130037300.3787310303906150.238794185601831
0.1646039548917930.8487158511059420.8673386590896720.5238445530684020.09944312226246920.0150701286034250
0.9840407921935940.5946535997668140.007541751788795570.6854820113672510.05267904609493910.385616709828973
0.7709582675814210.1514116849251030.9792003620268720.6913578924561760.8403359271518640.849810973659949
0.9668857599742110.03675308547917140.9147010927870340.6468540119514230.2920059372224230.578030193450552
0.7451277881319010.6982848268462660.7460407713848210.3259160644119130.8678459348731250.663570693012045
0.9920185005976160.6027917359764130.3531233577902690.5371372948878970.7412141481511780.439961577423509

 

部分训练数据的输出:

 

0.130523381100251
0.618623287834938
-0.321656510750489
0.363319811700566
0.254433843325185
0.874845036859242
0.104176523887105
0.235307927198731
0.131726000057133
0.282824656959602
-0.565824500365298
0.882580048430309
0.464001029736403
0.199026179272292
0.583130093729442
0.418305305227949
-0.909251562181937
-0.289435868130322
-0.786544616117274
-0.500913539045167

 

部分代码如下:最大训练次数为10000次。

 

close all
clear
clc
inputn=rand(200,6);%训练集输入
outputn=sin(sum(inputn,2));%训练集输出
maxgen=10000;%最大训练次数
m=size(inputn,1);%训练样本数目
I=6;%输入维度
M=6;%神经元
xite=0.001;%可以自己修改
alfa=0.001;%可以自己修改
ErrorP=NaN;

 

2.2在训练集上的结果:训练集共200组数据

 

2.2.1预测值与真实值(红色为预测值,绿色为真实值)

 

 

2.2.2预测值与真实值的绝对误差

 

 

2.2.3绝对误差MAE随着训练次数的变化图

 

 

最终在训练集上的平均绝对误差MAE为0.01688,由此可见,训练效果显着。

 

2.3在测试集上的结果:测试集共100组数据

 

2.3.1预测值与真实值(红色为预测值,绿色为真实值)

 

 

2.3.2预测值与真实值的绝对误差

 

 

最终在测试集的平均绝对误差MAE为0.02578。

 

三、参考代码

Be First to Comment

发表评论

您的电子邮箱地址不会被公开。