示例#1
0
def plot_overlap_cumulative(df, size=100):
    fig, ax = plots.cumulative_distribution(df.w,
                                            df.ovrl,
                                            label='Within Company Overlap')
    fig, ax = plots.cumulative_distribution(df.w,
                                            df.e_ovrl,
                                            label='Full network',
                                            fig=fig,
                                            ax=ax)
    ax.set_xlabel(r'$P_{>}(w)$')
    ax.set_ylabel(r'$\langle O | P_{>}(w) \rangle$')
    ax.set_title(
        'Overlap as a function of cumulative distribution of number of calls')
    ax.legend(loc=0)
    fig.savefig(run_path + 'overlap_cumulative_calls.png')
    return fig, ax
示例#2
0
def plot_btrns_cumulative(df, size=100):
    idx = df.c_brtrn.notnull()
    fig, ax = plots.cumulative_distribution(df.c_brtrn[idx],
                                            df.ovrl[idx],
                                            size=100)
    fig, ax = plots.cumulative_distribution(df.c_wkn_t[idx],
                                            df.ovrl[idx],
                                            size=100,
                                            fig=fig,
                                            ax=ax)
    ax.set_xlabel(r'$P_>(\tau_r^{-1})$')
    ax.set_ylabel(r'$\langle O | P_>(\tau_r^{-1}) \rangle$')
    ax.set_title(
        'Overlap as a function of cumulative \n inverse residual waiting time')
    ax.legend()
    fig.savefig(run_path + 'brtrn_cumulative.png')
    return fig, ax
示例#3
0
def plot_iet_mean_cumulative(df):
    idx = df.c_iet_mu_na.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_mu_na[idx],
                                            df.ovrl[idx],
                                            label='Naive')
    idx = df.c_iet_mu_km.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_mu_km[idx],
                                            df.ovrl[idx],
                                            label='KM',
                                            fig=fig,
                                            ax=ax)
    ax.legend()
    ax.set_xlabel(r'$P_{>}(\tau)$')
    ax.set_ylabel(r'$\langle O | P_{>}(\tau) \rangle$')
    ax.set_title('Overlap as a function of cumulative mean inter-event time ')
    fig.savefig(run_path + 'mean_iet_cumulative.png')
    return fig, ax
示例#4
0
def plot_iet_rfresh_cumulative(df, factor=1.1):
    idx = df.c_iet_rfsh_na.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_rfsh_na[idx],
                                            df.ovrl[idx])
    ax.set_xlabel(r'$P_>(f)$')
    ax.set_ylabel(r'$\langle O | P_>(f) \rangle$')
    ax.set_title('Overlap as a function of cumulative \n relative freshness')
    fig.savefig(run_path + 'rfsh_iets_cumulative.png')
    return fig, ax
示例#5
0
def plot_iet_sig_cumulative(df, factor=1.1):
    idx = df.c_iet_sig_na.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_sig_na[idx],
                                            df.ovrl[idx],
                                            label='Naive')
    idx = df.c_iet_sig_km.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_sig_km[idx],
                                            df.ovrl[idx],
                                            label='KM',
                                            fig=fig,
                                            ax=ax)
    ax.legend()
    ax.set_xlabel(r'$P_>(\sigma_{\tau})$')
    ax.set_ylabel(r'$\langle O | P_>(\sigma_{\tau}) \rangle$')
    ax.set_title(
        'Overlap as a function of cumulative \n inter-event time standard deviation'
    )
    fig.savefig(run_path + 'std_iets_cumulative.png')
    return fig, ax
示例#6
0
def plot_iet_aget_cumulative(df, size=100):
    idx = df.c_iet_age_na.notnull()
    fig, ax = plots.cumulative_distribution(1 / df.c_iet_age_na[idx],
                                            df.ovrl[idx],
                                            size=100)
    ax.set_xlabel(r'$P_>(\tau_r^{-1})$')
    ax.set_ylabel(r'$\langle O | P_>(\tau_r^{-1}) \rangle$')
    ax.set_title(
        'Overlap as a function of cumulative \n inverse residual waiting time')
    fig.savefig(run_path + 'age_iets_cumulative.png')
    return fig, ax
示例#7
0
def plot_iet_bur_cumulative(df, size=20, arg='-'):
    idx = df.c_iet_bur_na.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_bur_na[idx],
                                            df.ovrl[idx],
                                            label='Naive',
                                            size=size,
                                            arg=arg)
    idx = df.c_iet_bur_km.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_bur_km[idx],
                                            df.ovrl[idx],
                                            label='KM',
                                            fig=fig,
                                            ax=ax,
                                            size=size,
                                            arg=arg)
    idx = df.c_iet_bur_c_na.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_bur_c_na[idx],
                                            df.ovrl[idx],
                                            label='C-Naive',
                                            fig=fig,
                                            ax=ax,
                                            size=size,
                                            arg=arg)
    idx = df.c_iet_bur_c_km.notnull()
    fig, ax = plots.cumulative_distribution(df.c_iet_bur_c_km[idx],
                                            df.ovrl[idx],
                                            label='C-KM',
                                            fig=fig,
                                            ax=ax,
                                            size=size,
                                            arg=arg)
    ax.legend()
    ax.set_xlabel(r'$P_{>}(B)$')
    ax.set_ylabel(r'$\langle O | P_{>}(B) \rangle$')
    ax.set_title('Overlap as a function of cumulative burstiness')
    fig.savefig(run_path + 'bur_iet_cumulative.png')
    return fig, ax