做神经网络LVM算法学习的时候,为什么我检查了好几遍代码,出现了图一的不合理清醒,明明图二的误差是对的呀?
[predict,mse,decision_value]=svmpredict(TS,TSX,model);%增加decision_value
predict=mapminmax(‘reverse’,predict’,TSps);%%转置矩阵得注意
predict=predict’;
% 打印回归结果
str=sprintf(’ 均方误差 MSE= %g 相关系数 R= %g%%’,mse(2),mse(3)*100);
disp(str);
%% 结果分析
figure;
hold on;
plot(ts,’-o’);
plot(predict,‘r-^’);
legend(‘原始数据’,‘回归预测数据’);
hold off;
title(‘原始数据和回归预测数据对比’,‘FontSize’,12);
xlabel(‘交易日天数(1990.12.19-2009.08.19)’,‘FontSize’,12);
ylabel(‘开盘数’,‘Fontsize’,12);
grid on;
figure;
error=predict-ts’;
plot(error,‘rd’);
title(‘误差图(predict dat