💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
GMDH理论是近年来新兴的一种自组织数据挖掘理论,尤其适用于诸如经济系统一类的复杂系统建模;而计量经济学充分吸收了经济、统计、数学等多学科的成熟理论,回归模型作为计量经济学的主要研究工具已经成为权威的经济问题分析手段。目前关于GMDH理论与回归分析之间的交叉研究还很少,关于GMDH算法对模型质量的评价工作也并不多见。本文着眼于GMDH理论与回归分析之间的结合研究,其意义在于:运用GMDH理论来改进回归模型的预测效果,运用计量经济模型的统计检验来补充GMDH模型评价工作,充分结合两个领域的优势,共同促进两个理论的进一步完善和发展。 结合GMDH理论和计量经济学理论两个领域的知识,相互补充以进行理论间的交叉研究,首先综述了GMDH理论与计量经济学理论的优势与不足,然后从理论和实证两方面展开研究,进行两者的交叉改进工作。本文章将在Matlab中使用GMDH和RNA-MLP进行预测帕拉州东南部的月降雨量,从显著性检验、数据划分和外准则以及多重共线性三个方面对GMDH和计量经济学建模进行了比较研究;GMDH方法的统计完善,将显著性检验嵌入GMDH算法并对新算法通过编程来实现,使建立的模型保持了GMDH模型的优点。
📚2 运行结果
部分代码:
%clc;
%clear;
%close all;
%% Load Data
%[Inputs, Targets] = house_dataset; % its an Example for Entering Data
%data = load('chemical_data_file');
%Inputs = data.Inputs;
%Targets = data.Targets;
%t=cputime;
load('./DADOS.mat')
Inputs = DADOS(:,1:25)';
Targets = DADOS(:,33)';
nData = size(Inputs,2);
Perm = randperm(nData);
% Train Data
pTrain = 0.7;
nTrainData = round(pTrain*nData);
TrainInd = Perm(1:nTrainData);
TrainInputs = Inputs(:,TrainInd);
TrainTargets = Targets(:,TrainInd);
% Test Data
pTest = 1 - pTrain;
nTestData = nData - nTrainData;
TestInd = Perm(nTrainData+1:end);
TestInputs = Inputs(:,TestInd);
TestTargets = Targets(:,TestInd);
%% Create and Train GMDH Network
params.MaxLayerNeurons = 14; % Maximum Number of Neurons in a Layer
params.MaxLayers = 15; % Maximum Number of Layers
params.alpha = 0.4; % Selection Pressure
params.pTrain = 0.7; % Train Ratio
%% Phase I
tic
N=10; % number of loops to gain "Mean" RMSE
% higher N cause more precission
EvaluationRMSEs=zeros(N,1);
disp('Evaluation of the netwoerk by RMSE please wait...')
Egmdh=cell(N,1);
for n=1:N
gmdh = GMDH(params, TrainInputs, TrainTargets);
EvaluationRMSEs(n)=gmdh.Layers{end}.RMSE2;
Egmdh{n}=gmdh;
end
clc;
% If the "Mean" RMSE is needed use this code :
% PossibleGoodRMSE=mean(EvaluationRMSEs);
% If the "Minimum" RMSE is needed use this code :
PossibleGoodRMSE=min(EvaluationRMSEs);
%% Phase II :
[~,Sortorder]=sort(EvaluationRMSEs);
Egmdh=Egmdh(Sortorder);
MaximumVariance=.1;
for m=1:N
Variance=abs(Egmdh{m}.Layers{end}.RMSE2-PossibleGoodRMSE)/PossibleGoodRMSE;
if Variance<MaximumVariance
Truegmdh=Egmdh{m};
break;
end
end
MaxLayerNeurons=params.MaxLayerNeurons;
for MaxLayerNeurons=2:MaxLayerNeurons
params.MaxLayerNeurons=MaxLayerNeurons;
A=NonShuffleGMDH(Truegmdh,params);
plot(MaxLayerNeurons,A.RMSE,'o','markerfacecolor','r')
xlabel('Neurons')
ylabel('RMSE')
hold on
grid on
if MaxLayerNeurons==2 % In the first Loop defineing evaluation point
Network=A;
else
if A.RMSE<Network.RMSE
Network=A;
end
end
end
%% Phase III
% Plot Neuroal Network
%Network=A; % In this point we make the program goes fo the last network
% (Network with MaxLayerNeurons) if you want the
% prog goes for the Optmised one simply "Comment"
% this Line
Plotneurones(Network);
% Evaluate GMDH Network
Outputs = ApplyGMDH(Network, Inputs);
TrainOutputs = Outputs(:,TrainInd);
TestOutputs = Outputs(:,TestInd);
tempo_execucao = toc
% Show Results
figure;
PlotResults(TrainTargets, TrainOutputs, 'Train Data');
%figure;
%PlotResults(TestTargets, TestOutputs, 'Test Data');
%figure;
%plotregression(TrainTargets, TrainOutputs, 'Train Data')
%figure;
%PlotResults(Targets, Outputs, 'All Data');
%if ~isempty(which('plotregression'))
%figure;
%plotregression(TrainTargets, TrainOutputs, 'Train Data', ...
% TestTargets, TestOutputs, 'TestData', ...
% Targets, Outputs, 'All Data');
%end
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]Elton Rafael Alves, Márcio Nirlando Gomes Lopes, Fabricio Silva Sales, Andson Marreiros Balieiro, Adônis Ferreira Raiol Leal (2023) A GMDH Approach for Forecast Monthly Rainfall in Southeast of Pará [Source Code].
[2]鲁茂.改进的GMDH算法及其应用[J].软科学,2008(04):17-20.