Esempio n. 1
0
def RSP_and_FE_wrapper(dirname):
    # assumes TP has been calculated and written out already
    t = read_transition_matrix(dirname + "/TP.dat")
    beta = 1.0
    rsp, fe = RSP_and_FE_distances(t, beta)

    outfilename = dirname + "/RSP.dat"
    np.savetxt(outfilename, rsp)
    outfilename = dirname + "/FE.dat"
    np.savetxt(outfilename, fe)
Esempio n. 2
0
def Von_Luxburg_approximations_wrapper(dirname):
    """From Von Luxburg etal, 2011, "Hitting and commute times in
    large graphs are often misleading"."""
    
    # assumes TP has been calculated and written out already
    t = read_transition_matrix(dirname + "/TP.dat")
    mfpt_vla, ct_vla = Von_Luxburg_approximations(t)

    outfilename = dirname + "/MFPT_VLA.dat"
    np.savetxt(outfilename, mfpt_vla)
    outfilename = dirname + "/CT_VLA.dat"
    np.savetxt(outfilename, ct_vla)