barahona-research-group / PyGenStability

PyGenStability: Multiscale community detection with generalized Markov Stability
https://barahona-research-group.github.io/PyGenStability/
GNU General Public License v3.0
32 stars 11 forks source link

Update notebooks #56

Closed d-schindler closed 2 years ago

d-schindler commented 2 years ago

This PR is to update the notebooks. It would be good to showcase scale selection in all examples.

d-schindler commented 2 years ago

I updated all examples and added a simple functionality for plotting all optimal partitions. As optimal scale selection is used in each example, I deleted example 5. I also made the folder structure a bit easier, e.g. to not have many duplicates of the create_graph.py file.

Perhaps the notebooks could profit from some markdown cells with explanations. I also wonder if we can analyse some small real-world networks or other interesting networks than SBM?

Moreover, I changed the term "time" with "scale" in the whole software in this branch.

d-schindler commented 2 years ago

Should we use the multi-scale SBM instead of the simple SBM in Example 1 and 3?

arnaudon commented 2 years ago

ah you should redo the PR to merge on master branch instead of scale_selection, but we can do that later once the scale_selection branch is merged. I'm good with renaming time-> scale! thanks for the clean up of the example folder!

arnaudon commented 2 years ago

ah github is smart, it updated the base branch, I'll clean up this PR later tonight!

codecov-commenter commented 2 years ago

Codecov Report

Merging #56 (65e7d53) into master (f00fd8e) will increase coverage by 6.27%. The diff coverage is 46.62%.

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   41.85%   48.13%   +6.27%     
==========================================
  Files           8        8              
  Lines         571      590      +19     
==========================================
+ Hits          239      284      +45     
+ Misses        332      306      -26     
Flag Coverage Δ
pytest 48.13% <46.62%> (+6.27%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pygenstability/plotting.py 0.00% <0.00%> (ø)
src/pygenstability/pygenstability.py 96.24% <95.74%> (+5.54%) :arrow_up:
src/pygenstability/constructors.py 100.00% <100.00%> (+9.40%) :arrow_up:
src/pygenstability/optimal_scales.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

d-schindler commented 2 years ago

I'm not sure what else is required for an auto-merge.

But do you think we should improve the notebooks further? - e.g. by adding markdown cells or having a more meaningful example than the single-scale SBM?

arnaudon commented 2 years ago

I'm not sure what else is required for an auto-merge.

But do you think we should improve the notebooks further? - e.g. by adding markdown cells or having a more meaningful example than the single-scale SBM?

As you prefer, I'll merge this one now, as it has more than notebook updates, feel free to keep improving the notebooks!