深圳大学实验报告
实验课程名称: 人工神经网络技术
实验项目名称: BP神经网络对蝴蝶花分类
学院: 专业: 软件工程
报告人: 学号: 班级:
同组人: 无
指导教师:
实验时间:
实验报告提交时间:
教务处制
实验目的
初步熟悉MATLAB 工作环境,熟悉命令窗口,学会使用帮助窗口查找帮助信息。
实验内容
1、网络设计,包括输入层、隐含层、输出层节点个数的设计。
2、算法步骤
3、编程,注意原始数据的通用化,数据输入的随机性。
4、网络训练,注意训练数据与验证数据分开。
5、网络验证
6、结果分析,修改隐含层节点个数,修改学习率,分别对结果的影响。
三、实验步骤
直接在Matlab软件中的Editor中运行以下代码:(完善的代码用红色字体表示)
%
% A BP NN with momentum to solve Fisher's Iris Flower problem
% by lixiujuan, Nov 13, 2011
%
% the NN architecture
% it is a three layers work 4-3-3.
%
% parameter description
% h=4 the node numer of input layer
% i=3 the node numer of hidden layer
% j=3 the node numer of output layer
% V[h,i] the weights between input and hidden layers
% W[i,j] the weights between hidden and output layers
% Pi[i] the thresholds of hidden layer nodes
% Tau[j] the thresholds of output layer nodes
% a[h] the input values
% b[i] the hidden layer node activations
% c[j] the output layer node activations
% ck[j] the desired output of output layer nodes
% d[j] the eror in output layer nodes
% e[i] the eror in hidden layer nodes
% DeltaW[i,j] the amount of change for the weights W[i,j]
% DeltaV[h,i] the amount of change for the weights V[h,i]
% DeltaPi[i] the amount of change for the thresholds Pi[i]
% DeltaTau[j] the amount of change for the thresholds Tau[j]
% Alpha= the leaning rate
% Beta= the leaning rate
% Gamma= the constant determines effect of past weight changes
% Tor= the torrelance that determines when to stop training
% Maxepoch=1000 the max iterate number
%
% other parameters
% Ntrain=115 the number of trainning sets
% Ntest=35 the number of test sets
% Otrain[115] the output of training sets
% Otest[35] the output of test sets
% Odesired[150] the desired output of training and test sets
%
% function description
% f(x)=logsig(x)
% f(x)=1/(1+exp(-x))
%
% data file
% input file:
%
close all; clc; clf; clear all;
% parameters for the
BP神经网络实验报告 来自淘豆网m.daumloan.com转载请标明出处.