bp神经网络matlab实例(bp神经网络matlab实例).doc

bp神经网络matlab实例(bp神经网络matlab实例)Case 1 training BP network by momentum gradient descent algorithm.

Training samples are defined as follows:

Input vector as

P =[-1 -2 31

-1 15 -3]

The target vector is t = [-1 -1 1 1]

Solution: the MATLAB program of this example is as follows:

Close all

Clear

Echo on

CLC

% NEWFF - generating a new feedforward neural network

% TRAIN -- training BP neural network

% SIM -- Simulation of BP neural network

Pause

Start by hitting any key

CLC

Percent defines training samples

% P as input vector

P=[-1, -2, 3, 1; -1, 1, 5, -3];

% T is the target vector

T=[-1, -1, 1, 1];

Pause;

CLC

% create a new feedforward neural network

Net=newff (minmax (P), [3,1], {'tansig','purelin'},'traingdm')

The current input layer weights and thresholds

InputWeights=net.IW{1,1}

Inputbias=net.b{1}

The current network layer weights and thresholds

LayerWeights=net.LW{2,1}

Layerbias=net.b{2}

Pause

CLC

% set training parameters

Net.trainParam.show = 50;

Net.trainParam.lr = 0.05;

Net.trainParam.mc = 0.9;

Net.trainParam.epochs = 1000;

Net.trainParam.goal = 1e-3;

Pause

CLC

% call TRAINGDM algorithm to train BP network

[net, tr]=train (net, P, T);

Pause

CLC

Simulation of BP network by%

A = sim (net, P)

Calculate the simulation error

E = T - A

MSE=mse (E)

Pause

CLC

Echo off

Example 2 adopts Bayesian regularization algorithm to improve the generalization ability of BP network. In this case, we used two kinds of training methods, namely L-M algorithm (trainlm) and the Bias regularization algorithm (trainbr), is used to train the BP network, so that it can fit attached to a white noise sine sample data. Among them, the sample data can be generated as follows MATLAB statements:

Input vector: P = [-1:0.05:1];

Target vector: randn ('seed',;

T = sin (2*pi*P) +0.1*randn (size (P));

Solution: the MATLAB program of this example is as follows:

Close all

Clear

Echo on

CLC

% NEWFF - generating a new feedforward neural network

% TRAIN -- training BP neural network

% SIM -- Simulati

bp神经网络matlab设计实例,bp神经网络matlab实例(bp神经网络matlab实例).doc相关推荐

  1. 用matlab设计滤波器实验报告,数字信号出来实验报告--matlab滤波器设计

    数字信号出来实验报告--matlab滤波器设计 广 西 工 学 院 实 验 报 告 用 纸 实验名称 IIR数字滤波器的设计 实验成绩 指导老师 陈艳 系(院) 计算机工程系 班级 学号 学生姓名 一 ...

  2. 基于pynq的数字识别神经网络加速器设计

    文章目录 基于pynq的数字识别神经网络加速器设计 软件部分 1. 全连接神经网络: 2. 卷积神经网络搭建: 3. 文件格式转换: 硬件部分 1. MNIST的硬件实现思路 2. 代码编写与硬件综合 ...

  3. matlab衍射,使用Matlab设计制造衍射光学元件DOEs

    文件名大小更新时间 使用Matlab设计制造衍射光学元件DOEs02018-06-08 使用Matlab设计制造衍射光学元件DOEs\Chapter_3_Eight_level_phase_grati ...

  4. 【预测模型】基于BP神经网络、LSTM、GRNN实现风电功率预测附matlab代码

    1 简介 风电功率预测结果的准确性,不仅关系到风力发电厂的综合运行效率,也与区域运行成本具备直接联系,基于BP神经网络.LSTM.GRNN实现风电功率预测.​经过实例分析,证明设计的方法对风电功率的预 ...

  5. BP神经网络简单应用实例,bp神经网络的设计方法

    需要把MATLAB中的BP神经网络工具箱与自己的一个软件项目结合 这个就是C++与matlab混合编程.但是神经网络工具箱比较特别,它反盗用比较严厉.采用传统的混编方式,可以调用matlab自己的函数 ...

  6. 【Matlab风电功率预测】遗传算法优化BP神经网络风电功率预测【含源码 760期】

    一.代码运行视频(哔哩哔哩) [Matlab风电功率预测]遗传算法优化BP神经网络风电功率预测[含源码 760期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1 ...

  7. Matlab:基于Matlab实现人工智能算法应用的简介(BP神经网络算法NN、SOFM神经网络)、案例应用(基于Matlab的GUI的方式创建/训练/预测神经网络)之详细攻略

    Matlab:基于Matlab实现人工智能算法应用的简介(BP神经网络算法NN.SOFM神经网络).案例应用(基于Matlab的GUI的方式创建/训练/预测神经网络)之详细攻略 目录

  8. gadecod matlab,【预测模型】基于遗传算法优化BP神经网络房价预测matlab源码

    一.简介 1 遗传算法概述 遗传算法(Genetic Algorithm,GA)是进化计算的一部分,是模拟达尔文的遗传选择和自然淘汰的生物进化过程的计算模型,是一种通过模拟自然进化过程搜索最优解的方法 ...

  9. 回归预测 | MATLAB实现DBN-BP深度置信网络结合BP神经网络多输入单输出回归预测

    回归预测 | MATLAB实现DBN-BP深度置信网络结合BP神经网络多输入单输出回归预测 目录 回归预测 | MATLAB实现DBN-BP深度置信网络结合BP神经网络多输入单输出回归预测 预测效果 ...

  10. 《MATLAB神经网络案例分析》学习(一)——BP神经网络基本理论

    一.BP神经网络理论基本介绍 BP(Back Propagation)是一种按误差逆传播算法训练的多层前馈网络,是应用最广泛的神经网络模型之一.BP网络能学习和存贮大量的输入-输出模式映射关系,而无需 ...

最新文章

  1. Python基础12-常用的内置函数
  2. The Elements of Statistical Learning的笔记
  3. Kubernetes中Service的种类
  4. [FF-A]-01-Introduction
  5. Windows内核实验005 Inline Hook
  6. 服务器和操作系统怎么看,服务器和操作系统怎么看
  7. JVM内存区域:常用指令集
  8. 【问题记录】服务器部署项目时启动tomcat后报错 HTTP 错误 404.0- Not Found 您要找的资源已被删除、已更名或暂时不可用 解决方案···
  9. shell编程报错:“syntax error near unexpected token `”
  10. 【51Nod - 1272 】最大距离 (思维,排序sort的空间优化)
  11. 南京大学开源!ResT:高效Transformer架构!
  12. 2017.5.12PM
  13. hdu 4128 Running relay (线性规划转半平面交)
  14. 运算放大器的偏置电流、失调电流
  15. 主流七款web服务器软件点评,几款比较好的WEB服务器软件推荐
  16. ES报错处理-mapper [xx.xx] of different type, current_type [text], merged_type [keyword]
  17. linux基础命令(二)
  18. JVM(四)--垃圾收集器
  19. 初入python世界——python基础语法
  20. 人脸识别几个解决方案分析与测评

热门文章

  1. Android多线程的几种实现方式
  2. codeblocks编译运行c++文件显示“不支持的16位应用程序,与64位版本的Windows不兼容”的解决办法
  3. 靶场搭建(二)kali虚拟机准备
  4. Windows系统锁屏后长时间不操作 自动关闭了已打开的应用程序 解决办法
  5. 如何执行一条汇编指令
  6. 数据库连接对象Connection对象的获取及相关知识总结
  7. phpcms v9电脑pc站+手机wap移动端双模板共用数据库数据同步可同步生成静态文件
  8. 自用PTA题目记录0025
  9. foreign 磁盘阵列_RAID的里的foreign config 什么意思
  10. cellpadding和cellspacing的区别