%% SOM神经网络的数据分类--柴油机故障诊断
%
%
% <html>
% <table border="0" width="600px" id="table1"> <tr> <td><b><font size="2">该案例作者申明:</font></b></td> </tr> <tr> <td><span class="comment"><font size="2">1:本人长期驻扎在此<a target="_blank" href="http://www.ilovematlab.cn/forum-158-1.html"><font color="#0000FF">板块</font></a>里,对<a target="_blank" href="http://www.ilovematlab.cn/thread-48362-1-1.html"><font color="#0000FF">该案例</font></a>提问,做到有问必答。</font></span></td></tr><tr> <td><span class="comment"><font size="2">2:此案例有配套的教学视频,配套的完整可运行Matlab程序。</font></span></td> </tr> <tr> <td><span class="comment"><font size="2"> 3:以下内容为该案例的部分内容(约占该案例完整内容的1/10)。</font></span></td> </tr> <tr> <td><span class="comment"><font size="2"> 4:此案例为原创案例,转载请注明出处(<a target="_blank" href="http://www.ilovematlab.cn/">Matlab中文论坛</a>,<a target="_blank" href="http://www.ilovematlab.cn/forum-158-1.html">《Matlab神经网络30个案例分析》</a>)。</font></span></td> </tr> <tr> <td><span class="comment"><font size="2"> 5:若此案例碰巧与您的研究有关联,我们欢迎您提意见,要求等,我们考虑后可以加在案例里。</font></span></td> </tr> <tr> <td><span class="comment"><font size="2"> 6:您看到的以下内容为初稿,书籍的实际内容可能有少许出入,以书籍实际发行内容为准。</font></span></td> </tr><tr> <td><span class="comment"><font size="2"> 7:此书其他常见问题、预定方式等,<a target="_blank" href="http://www.ilovematlab.cn/thread-47939-1-1.html">请点击这里</a>。</font></span></td> </tr></table>
% </html>
%
%% 清空环境变量
clc
clear
%% 录入输入数据
% 载入数据
load p;
%转置后符合神经网络的输入格式
P=P';
%% 网络建立和训练
% newsom建立SOM网络。minmax(P)取输入的最大最小值。竞争层为6*6=36个神经元
net=newsom(minmax(P),[6 6]);
plotsom(net.layers{1}.positions)
% 5次训练的步数
a=[10 30 50 100 200 500 1000];
% 随机初始化一个1*10向量。
yc=rands(7,8);
%% 进行训练
% 训练次数为10次
net.trainparam.epochs=a(1);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(1,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
% 训练次数为30次
net.trainparam.epochs=a(2);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(2,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
% 训练次数为50次
net.trainparam.epochs=a(3);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(3,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
% 训练次数为100次
net.trainparam.epochs=a(4);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(4,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
% 训练次数为200次
net.trainparam.epochs=a(5);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(5,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
% 训练次数为500次
net.trainparam.epochs=a(6);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(6,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
% 训练次数为1000次
net.trainparam.epochs=a(7);
% 训练网络和查看分类
net=train(net,P);
y=sim(net,P);
yc(7,:)=vec2ind(y);
plotsom(net.IW{1,1},net.layers{1}.distances)
yc
%% 网络作分类的预测
% 测试样本输入
t=[0.9512 1.0000 0.9458 -0.4215 0.4218 0.9511 0.9645 0.8941]';
% sim( )来做网络仿真
r=sim(net,t);
% 变换函数 将单值向量转变成下标向量。
rr=vec2ind(r)
%% 网络神经元分布情况
% 查看网络拓扑学结构
plotsomtop(net)
% 查看临近神经元直接的距离情况
plotsomnd(net)
% 查看每个神经元的分类情况
plotsomhits(net,P)
web browser http://www.ilovematlab.cn/viewthread.php?tid=65106
%%
%
% <html>
% <table align="center" > <tr> <td align="center"><font size="2">版权所有:</font><a
% href="http://www.ilovematlab.cn/">Matlab中文论坛</a> <script
% src="http://s3.cnzz.com/stat.php?id=971931&web_id=971931&show=pic" language="JavaScript" ></script> </td> </tr></table>
% </html>
%
chapter17.rar_SOM 故障_SOM 故障诊断_SOM故障_diesel engine_柴油机 故障
版权申诉
20 浏览量
2022-07-15
09:42:49
上传
评论 1
收藏 2KB RAR 举报
林当时
- 粉丝: 100
- 资源: 1万+
最新资源
- 基于Java的在线教育平台设计源码
- 升降压斩波电路电路图,buck-boost电路图
- Python 程序语言设计模式思路-结构型模式:组合模式:将对象组合成树形结构
- 毕业设计基于python矩阵分解的推荐算法研究源码+详细文档+全部数据资料 高分项目.zip
- 基于网络的入侵检测系统源码+数据集+详细文档(高分毕业设计).zip
- 微信小程序源码 旅行故事分享 - 面包旅行App界面设计与文本展示资源下载
- 微信小程序源码 创意互动游戏 - 你画我猜App下载
- 摸底考试_学生版20230305.py
- 课程设计基于FPGA数字钟课程设计源码+课设报告(95分以上).zip
- 基于Java的企业家申报系统设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0