Beispiel #1
0
def test_modularity_finetune_dir_low_modularity():
	x = load_directed_low_modularity_sample(thres=.67)
	seed = 39602351
	ci,oq = bct.modularity_louvain_dir(x, seed=seed)
	_,q = bct.modularity_finetune_dir(x, ci=ci, seed=seed)
	print q,oq
	assert q >= oq
Beispiel #2
0
def test_modularity_finetune_dir():
	x = load_directed_sample()
	seed = 26080
	ci,oq = bct.modularity_louvain_dir(x, seed=seed)
	for i in xrange(100):
		_,q = bct.modularity_finetune_dir(x, ci=ci)
		print q,oq
		assert q >= oq
Beispiel #3
0
def test_modularity_louvain_dir():
    x = load_directed_sample()
    seed = 43938304
    _, q = bct.modularity_louvain_dir(x, seed=seed)
    assert np.allclose(q, .32697921)
Beispiel #4
0
def test_modularity_louvain_dir_low_modularity():
    x = load_directed_low_modularity_sample(thres=.67)
    seed = 28917147
    _, q = bct.modularity_louvain_dir(x, seed=seed)
    assert np.allclose(q, .06934894)
Beispiel #5
0
def test_modularity_louvain_dir():
    x = load_directed_sample()
    seed = 43938304
    _, q = bct.modularity_louvain_dir(x, seed=seed)
    assert np.allclose(q, .32697921)
Beispiel #6
0
def test_modularity_louvain_dir_low_modularity():
    x = load_directed_low_modularity_sample(thres=.67)
    seed = 28917147
    _, q = bct.modularity_louvain_dir(x, seed=seed)
    assert np.allclose(q, .06934894)