UOMOP

X: Target PSNR, Y: Outage probability 본문

DE/Graph

X: Target PSNR, Y: Outage probability

Happy PinGu 2024. 9. 5. 13:53
plot_outage_probability(256, 40)
function plot_outage_probability(dim, snr)
    % 데이터 정의
    data = {
        512, 40, [18:30], [0, 0, 0, 0.07, 0.19, 0.68, 2.25, 5.67, 12.25, 22.96, 36.72, 52.0, 66.25], [0, 0, 0.01, 0.09, 0.3, 1.0, 2.86, 6.92, 13.83, 25.4, 39.77, 55.31, 69.1], [0, 0, 0.01, 0.1, 0.3, 1.13, 3.35, 7.95, 16.22, 28.64, 44.77, 61.04, 74.51], [0.04, 0.04, 0.04, 0.04, 0.06, 0.16, 0.42, 1.17, 3.24, 6.95, 13.79, 24.83, 38.65];
        512, 20, [18:30], [0, 0.02, 0.13, 0.57, 2.08, 6.14, 14.41, 27.55, 44.18, 61.0, 75.58, 85.32, 92.25], [0, 0.03, 0.22, 0.88, 2.92, 7.8, 16.49, 30.64, 47.75, 64.49, 78.56, 87.87, 94.32], [0.02, 0.08, 0.38, 1.21, 4.7, 11.33, 22.45, 38.42, 56.51, 72.27, 83.91, 91.21, 95.57], [0.36, 0.51, 0.87, 1.33, 2.11, 3.77, 7.23, 13.3, 23.99, 38.9, 55.67, 71.23, 83.75];
        256, 40, [18:30], [0, 0.02, 0.12, 0.44, 1.59, 4.54, 10.68, 21.39, 35.61, 51.97, 66.64, 78.4, 86.89], [0, 0.02, 0.16, 0.5, 1.98, 5.23, 11.83, 23.28, 38.14, 54.79, 69.24, 80.62, 88.62], [0, 0.03, 0.15, 0.51, 1.93, 5.47, 12.23, 23.84, 39.28, 55.9, 70.0, 81.72, 89.28], [0.03, 0.05, 0.15, 0.45, 1.71, 4.82, 11.2, 22.22, 37.25, 53.76, 68.71, 80.47, 88.38];
        256, 20, [18:30], [0.01, 0.09, 0.61, 2.45, 6.87, 16.17, 30.64, 47.86, 64.4, 77.98, 87.22, 93.36, 96.53], [0.05, 0.18, 0.71, 2.7, 7.41, 17.03, 31.66, 49.26, 66.29, 79.31, 88.43, 94.44, 97.25], [0.05, 0.25, 1.08, 3.71, 9.19, 20.01, 36.18, 53.61, 69.79, 82.04, 90.47, 94.91, 97.5], [0.63, 1.17, 2.15, 4.1, 8.57, 16.97, 29.6, 46.33, 62.72, 76.57, 86.51, 93.16, 96.41];
    };

    % 데이터 필터링
    selected_data = data(cell2mat(data(:,1)) == dim & cell2mat(data(:,2)) == snr, :);
    
    if isempty(selected_data)
        error('해당 dim과 snr 조건에 맞는 데이터가 없습니다.');
    end

    % 데이터 추출
    target_psnr = selected_data{1, 3};
    outage_proposed = selected_data{1, 4};
    outage_topk = selected_data{1, 5};
    outage_random = selected_data{1, 6};
    outage_deepjscc = selected_data{1, 7};  % 추가된 DeepJSCC 데이터

    % 그래프 그리기
    figure;
    plot(target_psnr, outage_proposed, 'r-*', 'LineWidth', 2, 'MarkerSize', 8, 'DisplayName', 'Proposed');
    hold on;
    plot(target_psnr, outage_topk, 'b--s', 'LineWidth', 2, 'DisplayName', 'TopK');
    plot(target_psnr, outage_random, 'g--d', 'LineWidth', 2, 'DisplayName', 'Random');
    plot(target_psnr, outage_deepjscc, 'k-.o', 'LineWidth', 2, 'MarkerSize', 8, 'DisplayName', 'DeepJSCC');  % DeepJSCC 추가
    
    hold off;

    % 그래프 설정
% 그래프 설정
    xlabel('Target PSNR (dB)');
    ylabel('Outage Probability (%)');
    
    % dim에 따라 title 설정
    if dim == 512
        title(sprintf('CR: 1/6, SNR: %d dB', snr));
    elseif dim == 256
        title(sprintf('CR: 1/12, SNR: %d dB', snr));
    end
    
    legend('show');
    legend('Location', 'northwest');
    ylim([0 100]);
    grid on;

end

'DE > Graph' 카테고리의 다른 글

X: FLOPs constraint, Y: Avg PSNR  (0) 2024.09.04
Feasibility for target PSNR  (0) 2024.09.04
Random Activate layer  (0) 2024.09.03
TopK Activate layer  (0) 2024.09.03
CBS activated layer  (0) 2024.09.03
Comments