📄 mfe_loadf_preda.m
字号:
function F=mfe_loadf_predA(perc,stochc,cal_period,for_period,model_size,X)
%MFE_LOADF_PREDA Auxiliary routine for MFE_LOADF.
% F=MFE_LOADF_PREDA(...) returns a vector of Model B day-ahead
% forecasts of the daily time series L.
%
% Input data:
% PERC - seasonal (deterministic) component for the full period,
% STOCHC - stochastic component for the full period,
% CAL_PERIOD - length of the calibration period,
% FOR_PERIOD - length of the forecast period,
% MODEL_SIZE - ARMA(X) model size; type "help armax" at the command
% line for format description,
% X - exogenous variable,
%
% Reference(s):
% [1] R.Weron (2007) "Modeling and Forecasting Electricity Loads and
% Prices: A Statistical Approach", Wiley, Chichester.
% Written by Adam Misiorek and Rafal Weron (2006.09.22)
% Copyright (c) 2006 by Rafal Weron
y = zeros(for_period,1);
F = zeros(for_period,1);
if size(model_size,2)==2
disp(['ARMA [',num2str(model_size),']'])
disp(['Processing ' num2str(for_period) ' data points ...'])
for t = 1:for_period,
% calibrate ARMA model to the stochastic component
M66 = armax(stochc(t:cal_period+t-1),model_size);
% make a day-ahead prediction
y66 = predict(stochc(t:cal_period+t),M66);
y(t) = y66(end);
F(t) = perc(cal_period+t)+y(t);
end
else
disp(['ARMAX [',num2str(model_size),']'])
disp(['Processing ' num2str(for_period) ' data points ...'])
for t = 1:for_period,
% calibrate ARMAX model to the stochastic component
M66 = armax([stochc(t:cal_period+t-1-1) X(t:cal_period+t-1-1)],model_size);
% make a day-ahead prediction
y66 = predict([stochc(t:cal_period+t-1) X(t:cal_period+t-1)],M66);
y(t) = y66(end);
F(t) = perc(cal_period+t)+y(t);
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -