LSTM预测基于matlab贝叶斯网络改进LSTM预测含Matlab源码 1158期
Posted 紫极神光
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LSTM预测基于matlab贝叶斯网络改进LSTM预测含Matlab源码 1158期相关的知识,希望对你有一定的参考价值。
一、简介
基于matlab贝叶斯网络改进LSTM预测
二、源代码
%%%%%%%%%% Gaussian Process Regression (GPR) %%%%%%%%%
% Demo: prediction using GPR
% ---------------------------------------------------------------------%
clc
close all
clear all
addpath(genpath(pwd))
% load data
%{
x : training inputs
y : training targets
xt: testing inputs
yt: testing targets
%}
% multiple input-single output
load('./data/data_1.mat')
% Set the mean function, covariance function and likelihood function
% Take meanConst, covRQiso and likGauss as examples
% Initialization of hyperparameters
hyp = struct('mean', 3, 'cov', [0 0 0], 'lik', -1);
% meanfunc = [];
% covfunc = @covSEiso;
% likfunc = @likGauss;
% % Initialization of hyperparameters
% hyp = struct('mean', [], 'cov', [0 0], 'lik', -1);
% Optimization of hyperparameters
hyp2 = minimize(hyp, @gp, -20, @infGaussLik, meanfunc, covfunc, likfunc,x, y);
% Regression using GPR
% yfit is the predicted mean, and ys is the predicted variance
% Visualization of prediction results
plotResult(yt, yfit)
% load data
%{
x : training inputs
y : training targets
xt: testing inputs
yt: testing targets
%}
% multiple input-multiple output
load('./data/data_2.mat')
% Set the mean function, covariance function and likelihood function
% Take meanConst, covRQiso and likGauss as examples
meanfunc = @meanConst;
covfunc = @covRQiso;
likfunc = @likGauss;
% Initialization of hyperparameters
hyp = struct('mean', 3, 'cov', [2 2 2], 'lik', -1);
% meanfunc = [];
% covfunc = @covSEiso;
% likfunc = @likGauss;
%
% hyp = struct('mean', [], 'cov', [0 0], 'lik', -1);
% Optimization of hyperparameters
% Regression using GPR
% yfit is the predicted mean, and ys is the predicted variance
三、运行结果
四、备注
版本:2014a
以上是关于LSTM预测基于matlab贝叶斯网络改进LSTM预测含Matlab源码 1158期的主要内容,如果未能解决你的问题,请参考以下文章
优化预测基于matlab贝叶斯优化LSTM预测含Matlab源码 1329期
时间序列预测基于matlab贝叶斯优化LSTM时间序列预测(单变量单输出)含Matlab源码 651期
数据预测基于matlab LSTM神经网络空调能耗数据预测含Matlab源码 051期
lstm预测基于鲸鱼优化算法改进的lstm预测matlab源码