clear
clc

choices_gt = cell(1,3);

load('benchmark/m1_hempishere.mat')
choices_gt_d1 = zeros(1, length(panda_choices), 'single');
for i=1:length(panda_choices)
    if guinea_pig_choices(i) + koala_choices(i) + lion_choices(i) + panda_choices(i) > 0
        choices_gt_d1(i) = 1;
    elseif guinea_pig_choices(i) + koala_choices(i) + lion_choices(i) + panda_choices(i) < 0
        choices_gt_d1(i) = -1;
    else
        choices_gt_d1(i) =  2 * randi([0, 1]) - 1;
    end
end

clear koala_choices guinea_pig_choices lion_choices panda_choices dragon_choices cheetah_choices metrics

load('benchmark/m2_hempishere.mat')
choices_gt_d2 = zeros(1, length(panda_choices), 'single');
for i=1:length(panda_choices)
    if guinea_pig_choices(i) + lion_choices(i) + panda_choices(i) + dragon_choices(i) > 0
        choices_gt_d2(i) = 1;
    elseif guinea_pig_choices(i) + lion_choices(i) + panda_choices(i) + dragon_choices(i) < 0
        choices_gt_d2(i) = -1;
    else
        choices_gt_d2(i) =  2 * randi([0, 1]) - 1;
    end
end

clear koala_choices guinea_pig_choices lion_choices panda_choices dragon_choices cheetah_choices metrics

load('benchmark/m3_hempishere.mat')
choices_gt_d3 = zeros(1, length(koala_choices), 'single');
for i=1:length(koala_choices)
    if guinea_pig_choices(i) + koala_choices(i) + lion_choices(i) + cheetah_choices(i) > 0
        choices_gt_d3(i) = 1;
    elseif guinea_pig_choices(i) + koala_choices(i) + lion_choices(i) + cheetah_choices(i) < 0
        choices_gt_d3(i) = -1;
    else
        choices_gt_d3(i) =  2 * randi([0, 1]) - 1;
    end
end

clear koala_choices guinea_pig_choices lion_choices panda_choices dragon_choices cheetah_choices metrics

choices_gt{1} = choices_gt_d1;
choices_gt{2} = choices_gt_d2;
choices_gt{3} = choices_gt_d3;

clear i choices_gt_d1 choices_gt_d2 choices_gt_d3

load('hemisphere_dataset_summary.mat', 'annotator_names', 'choices_all', 'choices_gt_all', 'metrics_all')
save('hemisphere_dataset_summary.mat','-v7.3')
save('hemisphere_dataset_gt.mat','choices_gt','-v7.3')
