Git Product home page Git Product logo

Comments (2)

aestrivex avatar aestrivex commented on August 24, 2024
  1. The visualization module has been ported to bctpy. Check under utils. Certain functions were changed since the matlab plot3D had no straightforward equivalent so I implemented it with mayavi.

  2. I have no strong opinion about the naming convention. Conservatively I copied the names in BCT. I would be open to changing them. For backwards compatiblity, it might be good to set up aliases for the old function names, after the new naming convention is established.

  3. Adhering to various different style guidelines is not a high priority for me. I am open to PRs addressing style issues. I will happily receive any style changes that don't negatively affect the readability of the code at a glance.

from bctpy.

leotrs avatar leotrs commented on August 24, 2024
  1. Noted.

  2. There are five functions that compute the clustering coefficient:

    clustering_coef_bd(A)
    clustering_coef_bu(G)
    clustering_coef_wd(W)
    clustering_coef_wu(W)
    clustering_coef_wu_sign(W, coef_type='default')
    

    I propose defining just one dispatcher function, which can easily handle
    the first four cases.

    clustering_coef(A, weighted=False, directed=False)
    

    This function would just switch over its arguments and call the correct
    version of clustering_coef.

    In this way, we don't touch the current functions so we have full backwards
    compatibility, but we can expose and encourage the use of the new
    dispatcher in the future.

    The fifth case, clustering_coef_wu_sign(W, coef_type='default') can be
    supported by the dispatcher with one more optional parameter,

    clustering_coef(A, weighted=False, directed=False, coef_type='default')
    

    which will only be used in case weighted and directed are True. A
    little less clear than I would have hoped, but I think it still works.

    I propose this scheme for all other measures too. There are also four
    versions for transitivity, two for agreement, etc.

  3. I'm sure by adhering to PEP8 we won't incur in any readability blunders, all the contrary. I'll prepare an example PR soon.

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.