Example #1
0
def increasing_thinning_sample_is_10000_walk_is_100():
    collected = {}
    for thinning in xrange(1,20,1):
        collected[thinning] = plotter.run(1, mhrw.gnutella_mhrw, 
                                          {'samples': 10000, 
                                           'length': 300,
                                           'thinning': thinning})
    return collected
Example #2
0
def increasing_sample_size():
    collected = {}
    for sample_size in xrange(0, 30001, 5000):
        if sample_size == 0: continue # ugly hack to skip first
        collected[sample_size] = plotter.run(3, mhrw.gnutella_mhrw, 
                                             {'samples': sample_size, 
                                              'length': 300,
                                              'thinning': 5})
    return collected
Example #3
0
def increasing_walk_length_sample_is_10000():
    collected = {}
    for walk in xrange(0,600,50):
        if walk == 0: continue # ugly hack to skip first
        collected[walk] = plotter.run(3, mhrw.gnutella_mhrw, 
                                      {'samples': 10000, 
                                       'length': walk,
                                       'thinning': 5})
    return collected
Example #4
0
def increasing_thinning_sample_is_10000_walk_is_100(graph):
    collected = {}
    for thinning in xrange(10,101,10):
        collected[thinning] = plotter.run(1, rwrw.rwrw_size_estimate, 
                                          {'graph': graph, 
                                           'n_samples': 10000, 
                                           'walk_length': 300,
                                           'thinning': thinning})
    return collected
Example #5
0
def increasing_sample_size(graph):
    collected = {}
    for sample_size in xrange(0, 30001, 5000):
        if sample_size == 0: continue # ugly hack to skip first
        collected[sample_size] = plotter.run(1, rwrw.rwrw_size_estimate, 
                                             {'graph': graph, 
                                              'n_samples': sample_size, 
                                              'walk_length': 300,
                                              'thinning': 5})
    return collected
Example #6
0
def increasing_walk_length_sample_is_10000(graph):
    collected = {}
    for walk in xrange(0,600,50):
        if walk == 0: continue # ugly hack to skip first
        collected[walk] = plotter.run(1, rwrw.rwrw_size_estimate, 
                                      {'graph': graph,
                                       'n_samples': 10000, 
                                       'walk_length': walk,
                                       'thinning': 5})
    return collected
Example #7
0
def sample():
    """run a WIS_WR sample and print the results to a file for plotting"""
    graph = nx.read_edgelist("p2p-Gnutella31.txt", delimiter="\t", nodetype=int)
    collected = {}
    for size in xrange(0, 30001, 5000):
        if size == 0:
            continue
        print "WIS_WR sample size: ", size
        collected[size] = plotter.run(3, wis_wr_size_estimate, {"n_samples": size, "graph": graph})

    plotter.print_data("wis_wr.data", collected)
    print "Finished"
Example #8
0
def sample():
    """run a UIS_WR sample and print the results to a file for plotting"""
    graph = nx.read_edgelist("p2p-Gnutella31.txt", delimiter='\t', nodetype=int)
    collected = {}
    for size in xrange(0, 30001, 5000):
        if size == 0: continue
        print 'UIS_WR sample size: ', size
        collected[size] = plotter.run(3, uis_wr_size_estimate,
                                      {'n_samples': size,
                                       'graph': graph})
    
    plotter.print_data('uis_wr.data', collected)
    print 'Finished'