In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "matlab gasoline octane number prediction case analysis based on near infrared spectrum", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "matlab gasoline octane number prediction case analysis based on near infrared spectrum" can help you solve your doubts.
This paper compares the application of two widely used supervised learning neural networks-BP neural network and RBF neural network in regression fitting.
% clear environment variables
Clear
Clc
%% training set / test set generation
Load spectra_data.mat
% randomly generate training set and test set
Temp = randperm (size (NIR,1))
% training set-50 samples
P_train = NIR (temp (1:50),:)'
T_train = octane (temp (1:50),:)'
% Test set-10 samples
P_test = NIR (temp (51:end),:)'
T_test = octane (temp (51:end),:)'
N = size (Pruntestline 2)
%% BP neural network creation, training and simulation testing
% create a network
Net = newff (Prune Magnum thumbnail Magna 9)
% set training parameters
Net.trainParam.epochs = 1000
Net.trainParam.goal = 1e-3
Net.trainParam.lr = 0.01,
% training network
Net = train (net,P_train,T_train)
% Simulation Test
T_sim_bp = sim (net,P_test)
% RBF neural network creation and simulation test
% create a network
Net = newrbe (packs, girls, girls and girls)
% Simulation Test
T_sim_rbf = sim (net,P_test)
%% performance evaluation
% relative error error
Error_bp = abs (T_sim_bp-T_test). / T_test
Error_rbf = abs (T_sim_rbf-T_test). / T_test
% determination coefficient R ^ 2
R2_bp = (N * sum (T_sim_bp. * T_test)-sum (T_sim_bp) * sum (T_test)) ^ 2 / ((N * sum ((T_sim_bp). ^ 2)-(sum (T_sim_bp)) ^ 2) * (N * sum ((T_test). ^ 2)-(sum (T_test)) ^ 2))
R2_rbf = (N * sum (T_sim_rbf. * T_test)-sum (T_sim_rbf) * sum (T_test)) ^ 2 / ((N * sum ((T_sim_rbf). ^ 2)-(sum (T_sim_rbf)) ^ 2) * (N * sum ((T_test). ^ 2)-(sum (T_test)) ^ 2))
% result comparison
Result_bp = [Troutest'This simplex bp'This simplex rbf' error_bp' error_rbf']
%% drawing
Figure
Plot (1RH NMagneThemagrbfjngkLizi.)
Legend ('real value','BP predicted value', 'RBF predicted value')
Xlabel ('forecast sample')
Ylabel ('octane number')
String = {'comparison of prediction results of octane number content in test set (BP vs RBF)'; ['R ^ 2 = 'num2str (R2_bp)' (BP)''R ^ 2 = 'num2str (R2_rbf)' (RBF)']}
Title (string)
After reading this, the article "case Analysis of gasoline Octane number Prediction based on matlab near Infrared Spectrum" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it before you can understand it. If you want to know more related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.