【FNN回归预测】基于Jaya优化前馈神经网络FNN实现数据回归预测附Matlab代码

在线体验各类最新模型,更有模型 免费Token 额度领取!
立即体验
简介: 【FNN回归预测】基于Jaya优化前馈神经网络FNN实现数据回归预测附Matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信      无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机

⛄ 内容介绍

本文介绍了人工神经网络技术,该技术可使用由反向传播算法训练的前馈神经网络来确定检测乳腺癌的可能性。在训练期间,反向传播被独立应用于优化,以发展ANN的互连权重。本文探索了一种使用25种特征(例如12例患者病史,13项物理发现,4项乳腺X线摄影发现)的ANN,最后通过活检的结果来确定存在乳腺癌的可能性。

⛄ 部分代码

% *************************************************************************************************************

%                  Source Code of JAYA Optimization based Feed-Forward

%                  Neural Network


% Cite: Wang S, Rao RV, Chen P, Zhang Y, Liu A, Wei L. Abnormal breast detection in

% mammogram images by feed-forward neural network trained by Jaya algorithm.


% *************************************************************************************************************

% Enjoy JAYA-ANN!

clc;

close all

% Generating random correlated data

mu = 50;

sigma = 5;

M = mu + sigma * randn(300, 2);

R = [1, 0.75; 0.75, 1];

L = chol(R);

M = M*L;

x = M(:,1);  % Example Inputs, Replace by your data inputs for your own experiments

y = M(:,2); % Example labels, Replace by your data labels for your own experiments

%% JAYA algorithms

%% Problem Definition

pop = 30;               % Population size

% Min-max normalization of data

m = max(x); mn = min(x); mm = m-mn;

X = ((x-mn)/mm); Y = ((x-mn)/mm);

% 90%:10% splitting of data for training and testing

sz = (ceil(size(X,1))*0.9);

inputs = (X(1:sz))';

targets = (Y(1:sz))';

XTest = (X(sz+1:end))';

YTest = Y(sz+1:end)';

% number of neurons

n = 4;

tic;

% create a neural network

net = feedforwardnet(n);

% configure the neural network for this dataset

net = configure(net, inputs, targets);

% Denormalizaion and Prediction by FNN

FNN_Pred = ((net(XTest))' * mm) + mn;

sz = n^2 + n + n + 1; % Number of design variables i.e., no. of weights in FNN                

maxGen = 30;            % Maximum number of iterations

mini = repmat(-1,1,sz); % Lower Bound of Variables

maxi = ones(1,sz);      % Upper Bound of Variables  

objective = @(x) NMSE(x, net, inputs, targets);      % Cost Function

disp(['Optimum value = ',num2str(val,10)])

figure;

plot(fopt,'LineWidth', 2);

xlabel('Itteration');

ylabel('Best Cost');

legend('JAYA');

disp(' ' );

% Setting optimized weights and bias in network

net = setwb(net, Best');

% Denormalizaion and Prediction by JAYA_FNN

JAYA_FNN_Pred = ((net(XTest))' * mm) + mn;

YTest = (YTest * mm) + mn;

JAYA_FNN_Execution_Time_Seconds = toc

% Plotting prediction results

figure;

plot(YTest,'LineWidth',2, 'Marker','diamond', 'MarkerSize',8);

hold on;

plot(FNN_Pred, 'LineWidth',2, 'Marker','x', 'MarkerSize',8);

plot(JAYA_FNN_Pred, 'LineWidth',2, 'Marker','pentagram', 'MarkerSize',8);

title('JAYA Optimization based Feed-Forward Neural Network');

xlabel('Time Interval');

ylabel('Values');

legend('Actual Values', 'FNN Predictions', 'JAYA-FNN Predictions');

hold off;

% Performance Evaluaion of FNN and JAYA-FNN

fprintf('Performance Evaluaion of FNN and JAYA-FNN using Normalized Root Mean Square Error \n');

NRMSE_FNN = (abs( sqrt( mean(mean((FNN_Pred - YTest).^2) )) )) / (max(YTest)-min(YTest))

NRMSE_JAYA_FNN = (abs( sqrt( mean(mean((JAYA_FNN_Pred - YTest).^2) ) ) )) / (max(YTest)-min(YTest))



% Objective Function for minimizing normalized mean square error of FNN by

% updation of nework's weights and biases

function [f] = NMSE(wb, net, input, target)

% wb is the weights and biases row vector obtained from the genetic algorithm.

% It must be transposed when transferring the weights and biases to the network net.

net = setwb(net, wb');

% The net output matrix is given by net(input). The corresponding error matrix is given by

error = target - net(input);

% The mean squared error normalized by the mean target variance is

f = (mean(error.^2)/mean(var(target',1)));

% It is independent of the scale of the target components and related to the Rsquare statistic via

% Rsquare = 1 - NMSEcalc ( see Wikipedia)

end

⛄ 运行结果

⛄ 参考文献

[1] Babu G A ,  Bhukya S N ,  Kumar R S . Feed forward network with back propagation algorithm for detection of breast cancer[C]// International Conference on Computer Science & Education. IEEE, 2013.

[2]朱正林, 刘权, 张欢. 基于优化广义回归神经网络的碟式太阳能温度预测研究[J]. 南京工程学院学报:自然科学版, 2020, 18(1):5.

⛳️ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料


相关文章
|
10月前
|
机器学习/深度学习 算法 调度
14种智能算法优化BP神经网络(14种方法)实现数据预测分类研究(Matlab代码实现)
14种智能算法优化BP神经网络(14种方法)实现数据预测分类研究(Matlab代码实现)
661 0
|
9月前
|
机器学习/深度学习 人工智能 算法
【基于TTNRBO优化DBN回归预测】基于瞬态三角牛顿-拉夫逊优化算法(TTNRBO)优化深度信念网络(DBN)数据回归预测研究(Matlab代码实现)
【基于TTNRBO优化DBN回归预测】基于瞬态三角牛顿-拉夫逊优化算法(TTNRBO)优化深度信念网络(DBN)数据回归预测研究(Matlab代码实现)
353 0
|
10月前
|
机器学习/深度学习 数据采集 运维
改进的遗传算法优化的BP神经网络用于电厂数据的异常检测和故障诊断
改进的遗传算法优化的BP神经网络用于电厂数据的异常检测和故障诊断
|
9月前
|
机器学习/深度学习 算法 机器人
【水下图像增强融合算法】基于融合的水下图像与视频增强研究(Matlab代码实现)
【水下图像增强融合算法】基于融合的水下图像与视频增强研究(Matlab代码实现)
767 0
|
9月前
|
算法 定位技术 计算机视觉
【水下图像增强】基于波长补偿与去雾的水下图像增强研究(Matlab代码实现)
【水下图像增强】基于波长补偿与去雾的水下图像增强研究(Matlab代码实现)
1085 0
|
9月前
|
算法 机器人 计算机视觉
【图像处理】水下图像增强的颜色平衡与融合技术研究(Matlab代码实现)
【图像处理】水下图像增强的颜色平衡与融合技术研究(Matlab代码实现)
285 0
|
9月前
|
新能源 Java Go
【EI复现】参与调峰的储能系统配置方案及经济性分析(Matlab代码实现)
【EI复现】参与调峰的储能系统配置方案及经济性分析(Matlab代码实现)
283 0
|
9月前
|
机器学习/深度学习 算法 机器人
使用哈里斯角Harris和SIFT算法来实现局部特征匹配(Matlab代码实现)
使用哈里斯角Harris和SIFT算法来实现局部特征匹配(Matlab代码实现)
393 8
|
9月前
|
机器学习/深度学习 编解码 算法
基于OFDM技术的水下声学通信多径信道图像传输研究(Matlab代码实现)
基于OFDM技术的水下声学通信多径信道图像传输研究(Matlab代码实现)
382 8
|
9月前
|
机器学习/深度学习 数据采集 测试技术
基于CEEMDAN-VMD-BiLSTM的多变量输入单步时序预测研究(Matlab代码实现)
基于CEEMDAN-VMD-BiLSTM的多变量输入单步时序预测研究(Matlab代码实现)
335 8

热门文章

最新文章