clear, close all
addpath(genpath(pwd));

num_experiments=100;  

load('..\data\primary\WellTime.mat')

k=77; % 从多次experiments中随机选择一次的结果绘图
for q=1:5
	% 导入训练集真值
	filename=sprintf('%s%d%s%d','y_train_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);
    
    % 导入训练集预测值
	filename=sprintf('%s%d%s%d','yy_train_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);

	% 导入训练集不确定性
	filename=sprintf('%s%d%s%d','sd_train_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);

    % 导入训练集索引
	filename=sprintf('%s%d%s%d','train_indices_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);
        
	% 导入测试集真值
	filename=sprintf('%s%d%s%d','y_test_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);
        
	% 导入测试集预测值
	filename=sprintf('%s%d%s%d','yy_test_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);

	% 导入测试集不确定性
	filename=sprintf('%s%d%s%d','sd_test_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');
	load(filepath);

    % 导入测试集索引
	filename=sprintf('%s%d%s%d','test_indices_experiment',k,'_well',q);
	filepath=strcat('../data/intermediate/multitests_results_1/',filename,'.mat');   
	load(filepath);
end

h2=figure; 
set(h2,'Color','w');
h3=figure; 
set(h3,'Color','w');
curveswithuncertainty(1,time1,eval(sprintf('%s%d%s','y_train_experiment',k,'_well1')),eval(sprintf('%s%d%s','yy_train_experiment',k,'_well1')),eval(sprintf('%s%d%s','sd_train_experiment',k,'_well1')),eval(sprintf('%s%d%s','train_indices_experiment',k,'_well1')),eval(sprintf('%s%d%s','y_test_experiment',k,'_well1')),eval(sprintf('%s%d%s','yy_test_experiment',k,'_well1')),eval(sprintf('%s%d%s','sd_test_experiment',k,'_well1')),eval(sprintf('%s%d%s','test_indices_experiment',k,'_well1')),h2,h3)
curveswithuncertainty(2,time2,eval(sprintf('%s%d%s','y_train_experiment',k,'_well2')),eval(sprintf('%s%d%s','yy_train_experiment',k,'_well2')),eval(sprintf('%s%d%s','sd_train_experiment',k,'_well2')),eval(sprintf('%s%d%s','train_indices_experiment',k,'_well2')),eval(sprintf('%s%d%s','y_test_experiment',k,'_well2')),eval(sprintf('%s%d%s','yy_test_experiment',k,'_well2')),eval(sprintf('%s%d%s','sd_test_experiment',k,'_well2')),eval(sprintf('%s%d%s','test_indices_experiment',k,'_well2')),h2,h3)
curveswithuncertainty(3,time3,eval(sprintf('%s%d%s','y_train_experiment',k,'_well3')),eval(sprintf('%s%d%s','yy_train_experiment',k,'_well3')),eval(sprintf('%s%d%s','sd_train_experiment',k,'_well3')),eval(sprintf('%s%d%s','train_indices_experiment',k,'_well3')),eval(sprintf('%s%d%s','y_test_experiment',k,'_well3')),eval(sprintf('%s%d%s','yy_test_experiment',k,'_well3')),eval(sprintf('%s%d%s','sd_test_experiment',k,'_well3')),eval(sprintf('%s%d%s','test_indices_experiment',k,'_well3')),h2,h3)
curveswithuncertainty(4,time4,eval(sprintf('%s%d%s','y_train_experiment',k,'_well4')),eval(sprintf('%s%d%s','yy_train_experiment',k,'_well4')),eval(sprintf('%s%d%s','sd_train_experiment',k,'_well4')),eval(sprintf('%s%d%s','train_indices_experiment',k,'_well4')),eval(sprintf('%s%d%s','y_test_experiment',k,'_well4')),eval(sprintf('%s%d%s','yy_test_experiment',k,'_well4')),eval(sprintf('%s%d%s','sd_test_experiment',k,'_well4')),eval(sprintf('%s%d%s','test_indices_experiment',k,'_well4')),h2,h3)
curveswithuncertainty(5,time5,eval(sprintf('%s%d%s','y_train_experiment',k,'_well5')),eval(sprintf('%s%d%s','yy_train_experiment',k,'_well5')),eval(sprintf('%s%d%s','sd_train_experiment',k,'_well5')),eval(sprintf('%s%d%s','train_indices_experiment',k,'_well5')),eval(sprintf('%s%d%s','y_test_experiment',k,'_well5')),eval(sprintf('%s%d%s','yy_test_experiment',k,'_well5')),eval(sprintf('%s%d%s','sd_test_experiment',k,'_well5')),eval(sprintf('%s%d%s','test_indices_experiment',k,'_well5')),h2,h3)
