Time series forecast | MATLAB implements LSSVM least squares support vector machine time series to predict the future

Time series forecast | MATLAB implements LSSVM least squares support vector machine time series to predict the future

predictive effect

insert image description here
insert image description here

insert image description here
insert image description here

insert image description here
insert image description here

basic introduction

1. Matlab implements LSSVM time series to predict the future (least squares support vector machine);
2. The operating environment is Matlab2018 and above, data is a data set, univariate time series prediction, just run the main program LSSVMTSF, and the rest are function files, no need Run;
3. Recursively predict future data, you can control the number of predicted future size, suitable for cyclical and periodic data prediction;
4. Command window output R2, MAE, MAPE, MBE, MSE and other evaluation indicators.

programming

  • Complete program and data download methods Private letter blogger reply: MATLAB implements LSSVM least squares support vector machine time series to predict the future .
%%  参数设置
%% LSSVM参数设置
type       = 'f';                % 模型类型 回归
kernel     = 'RBF_kernel';       % RBF 核函数
proprecess = 'preprocess';       % 是否归一化

model = initlssvm(p_train, t_train, type, gam, sig, kernel, proprecess);

%% 训练模型
model = trainlssvm(model);

%% 模型预测
t_sim1 = simlssvm(model, p_train);
t_sim2 = simlssvm(model, p_test);

%%  数据反归一化
T_sim1 = mapminmax('reverse', t_sim1, ps_output);
T_sim2 = mapminmax('reverse', t_sim2, ps_output);


References

[1] https://blog.csdn.net/article/details/126072792?spm=1001.2014.3001.5502
[2] https://blog.csdn.net/article/details/126044265?spm=1001.2014.3001.5502

Guess you like

Origin blog.csdn.net/kjm13182345320/article/details/132701831