Comments (3)
No, I don't think so.
With reference to the one unit test of test_link_communities, the test case is as follows:
def test_link_communities():
x = load_sample(thres=0.4)
seed = 949389104
M = bct.link_communities(x)
assert np.max(M) == 1
This four line test case takes over an hour to run.
The reason is, the algorithm is simply very slow. I didn't write the algorithm, the people who designed it wrote it to be very slow. The python implementation is even slower. I haven't explored why the python implementation is very slow, but even the matlab implementation would take more than ten minutes to run I suspect.
I don't know how to fix it. At some point I may return to this function to try to see if I can optimize the algorithm to at least achieve closer to the matlab performance, but that would take a lot of effort and I don't have time to do that right now.
I would actually favor commenting out the unit test for now if it is a serious problem that the test runs too long, because I think link_communities takes too long to run for anyone to want to use it anyway when they could get mostly acceptable performance from functions like modularity_und.
from bctpy.
Agreed on that, I'd be happy to disable the test and maybe stick a warnings.warn("Don't use this algorithm")
in the method itself. I was more wondering if the sample data could be simplified so that the algorithm was doing the bare minimum to prove function, but glancing at the algorithm I guess it needs quite a complex data set to return much at all.
from bctpy.
Just going through the tests at the moment so I'll note down the ones which might be problematic:
nbs_tests.py: quite slow
modularity_derived_metrics_test.py: some runtime warnings
from bctpy.
Related Issues (20)
- NBS incorrectly(?) lumps positive and negative effects together
- B symmetrization inside if statement in community_louvain
- IndexError: index 2278 is out of bounds for axis 0 with size 2278 HOT 3
- bug: findwalks's for loop index is wrong at it's onset HOT 1
- Wrong description in `kcoreness_centrality_bu` HOT 1
- Update `get_rng` to return Generator instances
- Different implementations to compute global efficiency using bct.charpath and bct.efficiency_wei unclear HOT 1
- Does bct.efficiency_wei also work for directed networks? HOT 1
- Improve generalizability of partition_distance()
- No fucntion get_components.py inside module .algorithms? HOT 1
- Autofix(): Indexing error
- Issue with weighted transitivity and clustering coefficient? HOT 1
- Problem to run bct.modularity_dir with latest numpy HOT 1
- bct.charpath does not exclude 'Infs' in the distance matrix as mentioned in the documentation HOT 1
- Permutation max = 0 at stringent t-thresholds
- Official `bctpy` on `conda-forge` HOT 7
- local_assortativity_wu_sign not separating signs properly
- NBS covariates
- NBS parallel
- Release 0.6.1 missing tar.gz on Pipy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bctpy.