clear, close all

load ..\data\intermediate\ComparisonWithBenchmarkTechniques\eval_metrics_ANN.mat
load ..\data\intermediate\multitests_results_2\eval_metrics_after.mat
load ..\data\intermediate\ComparisonWithBenchmarkTechniques\eval_metrics_MVLR.mat


hfig=figure;set(hfig,'color','w');
b1=boxplot(rmse_test_after,'colors',[0.0235,0.5020,0.2627],'symbol','');hold on;
b2=boxplot(rmse_test_ANN,'colors',[0.5451 0.2706 0.0745],'symbol',''); hold on;
b3=boxplot(rmse_test_MVLR,'colors',[0 0.749 1],'symbol',''); hold on;
set(b1,'linewidth',2);
set(b2,'linewidth',2);
set(b3,'linewidth',2);
plot(median(rmse_test_after),':o','Markersize',5.0,'Color',[0.0235,0.5020,0.2627],'MarkerFaceColor',[0.0235,0.5020,0.2627],'linewidth',2);hold on;
plot(median(rmse_test_ANN),':o','Markersize',5.0,'Color',[0.5451 0.2706 0.0745],'MarkerFaceColor',[0.5451 0.2706 0.0745],'linewidth',2);
plot(median(rmse_test_MVLR),':o','Markersize',5.0,'Color',[0 0.749 1],'MarkerFaceColor',[0 0.749 1],'linewidth',2);
lg=legend('Random Forest (with the proposed correction)','Multi-layer feedforward neural network','Multivariate linear regression');
set(lg,'fontsize',15);
ylabel('RMSE','FontSize',20,'FontWeight','bold');
ylim([0.01,0.055]);
set(gca,'FontSize',20,'FontWeight','bold','linewidth',2,'xtick',1:5,'xticklabel',{'W1','W2','W3','W4','W5'});

hfig=figure;set(hfig,'color','w');
b1=boxplot(r2_test_after,'colors',[0.0235,0.5020,0.2627],'symbol','');hold on;
b2=boxplot(r2_test_ANN,'colors',[0.5451 0.2706 0.0745],'symbol',''); hold on;
b3=boxplot(r2_test_MVLR,'colors',[0 0.749 1],'symbol',''); hold on;
set(b1,'linewidth',2);
set(b2,'linewidth',2);
set(b3,'linewidth',2);
plot(median(r2_test_after),':o','Markersize',5.0,'Color',[0.0235,0.5020,0.2627],'MarkerFaceColor',[0.0235,0.5020,0.2627],'linewidth',2);hold on;
plot(median(r2_test_ANN),':o','Markersize',5.0,'Color',[0.5451 0.2706 0.0745],'MarkerFaceColor',[0.5451 0.2706 0.0745],'linewidth',2);
plot(median(r2_test_MVLR),':o','Markersize',5.0,'Color',[0 0.749 1],'MarkerFaceColor',[0 0.749 1],'linewidth',2);
lg=legend('Random Forest (with the proposed correction)','Multi-layer feedforward neural network','Multivariate linear regression','location','southeast');
set(lg,'fontsize',15);
ylabel('R^2','FontSize',20,'FontWeight','bold');
ylim([-0.6,1]);
set(gca,'FontSize',20,'FontWeight','bold','linewidth',2,'xtick',1:5,'xticklabel',{'W1','W2','W3','W4','W5'});
