b660849bcff934f16d08913f2157a9a7bb7e3a0b,pygsp/graphs/barabasialbert.py,BarabasiAlbert,__init__,#BarabasiAlbert#Any#Any#Any#,42
Before Change
W = sparse.lil_matrix((N, N))
if m0 > 1:
raise NotImplementedError("Initial connection of the nodes is not "
"implemented yet. Please keep m0 = 1.")
for i in range(m0, N):
distr = W.sum(axis=1)
if distr.sum() == 0:
W[0, 1] = 1
After Change
for i in range(m0, N):
distr = W.sum(axis=1)
distr += np.concatenate((np.ones((i, 1)), np.zeros((N-i, 1))))
connections = np.random.choice(N, size=m, replace=False, p=np.ravel(distr/distr.sum()))
for elem in connections:
W[elem, i] = 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: epfl-lts2/pygsp
Commit Name: b660849bcff934f16d08913f2157a9a7bb7e3a0b
Time: 2016-09-06
Author: lionel.martin@epfl.ch
File Name: pygsp/graphs/barabasialbert.py
Class Name: BarabasiAlbert
Method Name: __init__
Project Name: hyperopt/hyperopt
Commit Name: e8380a03134a586a554643abdef0944c3651b771
Time: 2011-10-22
Author: dyamins@gmail.com
File Name: hyperopt/theano_gp.py
Class Name: GP_BanditAlgo
Method Name: GP_EI_optimize
Project Name: geomstats/geomstats
Commit Name: 36bf1cd036d852d10b189727d43fee6ee0b6c66c
Time: 2020-04-02
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/geometry/special_euclidean.py
Class Name: SpecialEuclidean
Method Name: random_uniform