Git Product home page Git Product logo

Comments (3)

aestrivex avatar aestrivex commented on August 24, 2024

Sorry for the long delay, where is your test file

from bctpy.

duzc-Repos avatar duzc-Repos commented on August 24, 2024

Thank you, it seems fine after I fixed it.
Generally, I find two problems:

  1. the input seed network A would be modified *_gen, e.g. euclidean_gen(), so I add A = A.copy() at the beginning for every *_gen() function.
  2. index error, the following is an example:
# example in "euclidean_gen"

for i in range(mseed, m):
	C = np.append(0, np.cumsum(P[u, v]))
	#r = np.sum(rng.random_sample()*C[-1] >= C)
	r = np.sum(rng.random_sample()*C[-1] >= C) - 1 # modified by duzc
	b[i] = r
	P = Fd
	#P[u[b[:i]], v[b[:i]]] = P[v[b[:i]], u[b[:i]]] = 0
	P[u[b[:i+1]], v[b[:i+1]]] = P[v[b[:i+1]], u[b[:i+1]]] = 0 # modified by duzc

	A[u[r], v[r]] = A[v[r], u[r]] = 1

Please help me check it if convenient.

from bctpy.

duzc-Repos avatar duzc-Repos commented on August 24, 2024

The test file you can find in https://github.com/duzc-Repos/Code_for_Reproduction/tree/main/2021_NC_DanyalAkarca/bct_duzc_test_data
and https://github.com/duzc-Repos/Code_for_Reproduction/blob/main/2021_NC_DanyalAkarca/test_bct_duzc.py are my test file

from bctpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.