BP神经网络测试例子附数据.docx

上传人:b****6 文档编号:3379935 上传时间:2022-11-22 格式:DOCX 页数:7 大小:15.87KB
下载 相关 举报
BP神经网络测试例子附数据.docx_第1页
第1页 / 共7页
BP神经网络测试例子附数据.docx_第2页
第2页 / 共7页
BP神经网络测试例子附数据.docx_第3页
第3页 / 共7页
BP神经网络测试例子附数据.docx_第4页
第4页 / 共7页
BP神经网络测试例子附数据.docx_第5页
第5页 / 共7页
点击查看更多>>
下载资源
资源描述

BP神经网络测试例子附数据.docx

《BP神经网络测试例子附数据.docx》由会员分享,可在线阅读,更多相关《BP神经网络测试例子附数据.docx(7页珍藏版)》请在冰豆网上搜索。

BP神经网络测试例子附数据.docx

BP神经网络测试例子附数据

Train、txt

5、0,3、0,1、6,0、2,1

5、0,3、4,1、6,0、4,1

5、2,3、5,1、5,0、2,1

5、2,3、4,1、4,0、2,1

4、7,3、2,1、6,0、2,1

4、8,3、1,1、6,0、2,1

5、4,3、4,1、5,0、4,1

5、2,4、1,1、5,0、1,1

5、5,4、2,1、4,0、2,1

4、9,3、1,1、5,0、1,1

5、0,3、2,1、2,0、2,1

5、5,3、5,1、3,0、2,1

4、9,3、1,1、5,0、1,1

4、4,3、0,1、3,0、2,1

5、1,3、4,1、5,0、2,1

5、0,3、5,1、3,0、3,1

4、5,2、3,1、3,0、3,1

4、4,3、2,1、3,0、2,1

5、0,3、5,1、6,0、6,1

5、1,3、8,1、9,0、4,1

4、8,3、0,1、4,0、3,1

5、1,3、8,1、6,0、2,1

4、6,3、2,1、4,0、2,1

5、3,3、7,1、5,0、2,1

5、0,3、3,1、4,0、2,1

6、6,3、0,4、4,1、4,2

6、8,2、8,4、8,1、4,2

6、7,3、0,5、0,1、7,2

6、0,2、9,4、5,1、5,2

5、7,2、6,3、5,1、0,2

5、5,2、4,3、8,1、1,2

5、5,2、4,3、7,1、0,2

5、8,2、7,3、9,1、2,2

6、0,2、7,5、1,1、6,2

5、4,3、0,4、5,1、5,2

6、0,3、4,4、5,1、6,2

6、7,3、1,4、7,1、5,2

6、3,2、3,4、4,1、3,2

5、6,3、0,4、1,1、3,2

5、5,2、5,4、0,1、3,2

5、5,2、6,4、4,1、2,2

6、1,3、0,4、6,1、4,2

5、8,2、6,4、0,1、2,2

5、0,2、3,3、3,1、0,2

5、6,2、7,4、2,1、3,2

5、7,3、0,4、2,1、2,2

5、7,2、9,4、2,1、3,2

6、2,2、9,4、3,1、3,2

5、1,2、5,3、0,1、1,2

5、7,2、8,4、1,1、3,2

7、2,3、2,6、0,1、8,3

6、2,2、8,4、8,1、8,3

6、1,3、0,4、9,1、8,3

6、4,2、8,5、6,2、1,3

7、2,3、0,5、8,1、6,3

7、4,2、8,6、1,1、9,3

7、9,3、8,6、4,2、0,3

6、4,2、8,5、6,2、2,3

6、3,2、8,5、1,1、5,3

6、1,2、6,5、6,1、4,3

7、7,3、0,6、1,2、3,3

6、3,3、4,5、6,2、4,3

6、4,3、1,5、5,1、8,3

6、0,3、0,4、8,1、8,3

6、9,3、1,5、4,2、1,3

6、7,3、1,5、6,2、4,3

6、9,3、1,5、1,2、3,3

5、8,2、7,5、1,1、9,3

6、8,3、2,5、9,2、3,3

6、7,3、3,5、7,2、5,3

6、7,3、0,5、2,2、3,3

6、3,2、5,5、0,1、9,3

6、5,3、0,5、2,2、0,3

6、2,3、4,5、4,2、3,3

5、9,3、0,5、1,1、8,3

Test、txt

5、1,3、5,1、4,0、2,1

4、9,3、0,1、4,0、2,1

4、7,3、2,1、3,0、2,1

4、6,3、1,1、5,0、2,1

5、0,3、6,1、4,0、2,1

5、4,3、9,1、7,0、4,1

4、6,3、4,1、4,0、3,1

5、0,3、4,1、5,0、2,1

4、4,2、9,1、4,0、2,1

4、9,3、1,1、5,0、1,1

5、4,3、7,1、5,0、2,1

4、8,3、4,1、6,0、2,1

4、8,3、0,1、4,0、1,1

4、3,3、0,1、1,0、1,1

5、8,4、0,1、2,0、2,1

5、7,4、4,1、5,0、4,1

5、4,3、9,1、3,0、4,1

5、1,3、5,1、4,0、3,1

5、7,3、8,1、7,0、3,1

5、1,3、8,1、5,0、3,1

5、4,3、4,1、7,0、2,1

5、1,3、7,1、5,0、4,1

4、6,3、6,1、0,0、2,1

5、1,3、3,1、7,0、5,1

4、8,3、4,1、9,0、2,1

7、0,3、2,4、7,1、4,2

6、4,3、2,4、5,1、5,2

6、9,3、1,4、9,1、5,2

5、5,2、3,4、0,1、3,2

6、5,2、8,4、6,1、5,2

5、7,2、8,4、5,1、3,2

6、3,3、3,4、7,1、6,2

4、9,2、4,3、3,1、0,2

6、6,2、9,4、6,1、3,2

5、2,2、7,3、9,1、4,2

5、0,2、0,3、5,1、0,2

5、9,3、0,4、2,1、5,2

6、0,2、2,4、0,1、0,2

6、1,2、9,4、7,1、4,2

5、6,2、9,3、6,1、3,2

6、7,3、1,4、4,1、4,2

5、6,3、0,4、5,1、5,2

5、8,2、7,4、1,1、0,2

6、2,2、2,4、5,1、5,2

5、6,2、5,3、9,1、1,2

5、9,3、2,4、8,1、8,2

6、1,2、8,4、0,1、3,2

6、3,2、5,4、9,1、5,2

6、1,2、8,4、7,1、2,2

6、4,2、9,4、3,1、3,2

6、3,3、3,6、0,2、5,3

5、8,2、7,5、1,1、9,3

7、1,3、0,5、9,2、1,3

6、3,2、9,5、6,1、8,3

6、5,3、0,5、8,2、2,3

7、6,3、0,6、6,2、1,3

4、9,2、5,4、5,1、7,3

7、3,2、9,6、3,1、8,3

6、7,2、5,5、8,1、8,3

7、2,3、6,6、1,2、5,3

6、5,3、2,5、1,2、0,3

6、4,2、7,5、3,1、9,3

6、8,3、0,5、5,2、1,3

5、7,2、5,5、0,2、0,3

5、8,2、8,5、1,2、4,3

6、4,3、2,5、3,2、3,3

6、5,3、0,5、5,1、8,3

7、7,3、8,6、7,2、2,3

7、7,2、6,6、9,2、3,3

6、0,2、2,5、0,1、5,3

6、9,3、2,5、7,2、3,3

5、6,2、8,4、9,2、0,3

7、7,2、8,6、7,2、0,3

6、3,2、7,4、9,1、8,3

6、7,3、3,5、7,2、1,3

closeall;

clear;

clc;

%读取训练数据

[f1,f2,f3,f4,class]=textread('train、

'%f%f%f%f%d',75,'delimiter',',');

%特征值归一化

[input,minI,maxI]=premnmx([f1,f2,f3,f4]');

%构造输出矩阵

s=length(class);

output=zeros(s,3);

fori=1:

s

output(i,class(i))=1;

end

%创建神经网络

net=newff(minmax(input),[103],{'logsig'

'traingdx');

%设置训练参数

net、trainparam、show=50;

net、trainparam、epochs=500;

net、trainparam、goal=0、01;

net、trainParam、lr=0、01;

%开始训练

net=train(net,input,output');txt',,'purelin'}%读取测试数据

[t1t2t3t4c]=

'%f%f%f%f%d',75,'delimiter',',');textread('test、txt',%测试数据归一化

testInput=tramnmx([t1,t2,t3,t4]',minI,maxI);

%仿真

Y=sim(net,testInput)

%统计识别正确率

[s1,s2]=size(Y);

hitNum=0;

fori=1:

s2

[m,Index]=max(Y(:

i));

if(Index==c(i))

hitNum=hitNum+1;

end

end

sprintf('识别率就是%3、3f%%',100*hitNum/s2)

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1