✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
个人主页:Matlab科研工作室
个人信条:格物致知。
【BP分类】基于反向传播的多层感知器神经网络附matlab代码
%% Backpropagation for Multi Layer Perceptron Neural Networks %%
% title={A Novel Fractional Gradient-Based Learning Algorithm for Recurrent Neural Networks},
% author={Khan, Shujaat and Ahmad, Jawwad and Naseem, Imran and Moinuddin, Muhammad},
% journal={Circuits, Systems, and Signal Processing},
% volume={37},
% number={2},
% pages={593--612},
% year={2018},
% publisher={Springer US}
% }
%% Description
% In this simulation I used a Golub et al(1999)'s Leukemia Cancer Database.
% The details of the dataset is available online at [1]. The leukemia db
% is a gene expression dataset contains 7128 genes, 2-classes (47-ALL &
% 25-AML), divided into two subsets training and test subsets. The training
% dataset contains 27-ALL, and 11-AML total 38 samples, and the test subset
% contains 20-ALL, and 14-AML total 34 samples.
%
% The genes are ranked using mRMR feature selection method [2] and the
% index of top 1000 genes is stored in 'feature_with_mRMr_d' vector.
% [1] http://www.stats.uwo.ca/faculty/aim/2015/9850/microarrays/FitMArray/chm/Golub.html
% [2] https://kr.mathworks.com/matlabcentral/fileexchange/14608-mrmr-feature-selection--using-mutual-information-computation-
%% Start
clc
clear all
close all
%% Load Golub et al. Leukemia Cancer DB
load Database/leukemia_dataset
feature_length=5; % selecting top 5 most significant genes
train_data=train_data(feature_with_mRMr_d(1:feature_length),:)';
test_data=test_data(feature_with_mRMr_d(1:feature_length),:)';
%% Neural Network's parameters
% (size/structure of the MLP)
N1=20; % Middle Layer Neurons
N2=1; % Output Layer Neurons
N0=feature_length+1; % Input Layer Neurons (feature length + bias)
% Training parameters
eta = 0.5; % Learning Rate 0-1 eg .01, .05, .005
epoch=10; % Training iterations
[1]刘壮明. 前馈神经网络反向传播算法研究及在地面目标识别中的应用[J]. 声学所博硕士学位论文, 2006.
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料