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

load('..\data\primary\WellTime.mat')
load('..\data\intermediate\MDN_multitests_results\por_range.mat')

for k=77
    y_train_all=cell(5,1);
    yy_train_all=cell(5,1);
    sd_train_all=cell(5,1);
    train_indices_all=cell(5,1);
    y_test_all=cell(5,1);
    yy_test_all=cell(5,1);
    sd_test_all=cell(5,1);
    test_indices_all=cell(5,1);
    pdf_train_all=cell(5,1);
    pdf_test_all=cell(5,1);
    for q=1:5
        % 导入训练集真值
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\y_train_experiment',k,'_well',q,'.mat');
        load(filepath);
        y_train_all{q}=y_train;

        % 导入训练集预测值
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\yy_train_experiment',k,'_well',q,'.mat');
        load(filepath);
        yy_train_all{q}=yy_train;

        % 导入训练集不确定性
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\sd_train_experiment',k,'_well',q,'.mat');
        load(filepath);
        sd_train_all{q}=sd_train;

        % 导入训练集索引
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\train_indices_experiment',k,'_well',q,'.mat');
        load(filepath);
        train_indices_all{q}=train_indices;

        % 导入测试集真值
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\y_test_experiment',k,'_well',q,'.mat');
        load(filepath);
        y_test_all{q}=y_test;

        % 导入测试集预测值
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\yy_test_experiment',k,'_well',q,'.mat');
        load(filepath);
        yy_test_all{q}=yy_test;

        % 导入测试集不确定性
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\sd_test_experiment',k,'_well',q,'.mat');
        load(filepath);
        sd_test_all{q}=sd_test;

        % 导入测试集索引
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\test_indices_experiment',k,'_well',q,'.mat');
        load(filepath);
        test_indices_all{q}=test_indices;

        % 导入训练集pdf
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\pdf_train_experiment',k,'_well',q,'.mat');
        load(filepath);
        pdf_train_all{q}=pdf_train;

        % 导入测试集pdf
        filepath=sprintf('%s%d%s%d%s','..\data\intermediate\MDN_multitests_results\pdf_test_experiment',k,'_well',q,'.mat');
        load(filepath);
        pdf_test_all{q}=pdf_test;
    end

    h=figure;
    set(h,'Color','w');
    MDN_pdfwithsd(1,time1,y_train_all{1},yy_train_all{1},sd_train_all{1},pdf_train_all{1},train_indices_all{1},y_test_all{1},yy_test_all{1},sd_test_all{1},pdf_test_all{1},test_indices_all{1},h,por_range)
    MDN_pdfwithsd(2,time2,y_train_all{2},yy_train_all{2},sd_train_all{2},pdf_train_all{2},train_indices_all{2},y_test_all{2},yy_test_all{2},sd_test_all{2},pdf_test_all{2},test_indices_all{2},h,por_range)
    MDN_pdfwithsd(3,time3,y_train_all{3},yy_train_all{3},sd_train_all{3},pdf_train_all{3},train_indices_all{3},y_test_all{3},yy_test_all{3},sd_test_all{3},pdf_test_all{3},test_indices_all{3},h,por_range)
    MDN_pdfwithsd(4,time4,y_train_all{4},yy_train_all{4},sd_train_all{4},pdf_train_all{4},train_indices_all{4},y_test_all{4},yy_test_all{4},sd_test_all{4},pdf_test_all{4},test_indices_all{4},h,por_range)
    MDN_pdfwithsd(5,time5,y_train_all{5},yy_train_all{5},sd_train_all{5},pdf_train_all{5},train_indices_all{5},y_test_all{5},yy_test_all{5},sd_test_all{5},pdf_test_all{5},test_indices_all{5},h,por_range)
    
end 