Giter VIP home page Giter VIP logo

r-ghypernet's Introduction

Generic badge DOI Generic badge License: AGPL v3 R-CMD-check

Introduction

ghypernet is an OpenSource R package that allows to estimate and work with Generalised Hypergeometric Ensembles of Random Graphs (gHypEG).

ghypernet has been developed specifically for the analysis of networks characterised by a large number of repeated edges. It provides efficient methods to perform hypothesis testing and model selection on such data.

Explore the provided Vignettes for some examples on how to analyse networks with ghypernet.

Installation

# Install ghypernet from CRAN
install.packages("ghypernet")

# Or the development version from GitHub:
devtools::install_github("gi0na/r-ghypernet")

Dependencies

The package uses the library BiasedUrn to work with Wallenius' non-central hypergeometric distribution. Although this is not required, it is recommended to install the BiasedUrn R package, increasing the number of 'colours', i.e., the number of dimensions of the distribution. It can be easily done modifying the makevar file. In case the BiasedUrn library cannot be found, all computations will be performed using the multinomial approximation.

References

The theoretical foundation of the generalised hypergeometric ensemble, gHypEGs, has been developed in the following works:

Casiraghi, G., Nanumyan, V., Scholtes, I., & Schweitzer, F. (2016). Generalized Hypergeometric Ensembles: Statistical Hypothesis Testing in Complex Networks. ArXiv Preprint ArXiv:1607.02441.

Casiraghi, G. (2017). Multiplex Network Regression: How do relations drive interactions?. ArXiv Preprint ArXiv:1702.02048, 15.

Casiraghi, G., Nanumyan, V., Scholtes, I., & Schweitzer, F. (2017). From Relational Data to Graphs: Inferring Significant Links Using Generalized Hypergeometric Ensembles (Vol. 10540, pp. 111–120). Springer Verlag.

Casiraghi, G. (2019). The block-constrained configuration model. Applied Network Science, 4(1), 123.

Brandenberger, L., Casiraghi, G., Nanumyan, V., & Schweitzer, F. (2019). Quantifying triadic closure in multi-edge social networks. Proceedings of the 2019 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, 307–310.

Casiraghi, G., & Nanumyan, V. (2021). Configuration models as an urn problem. Sci Rep 11, 13416.

Casiraghi, G. (2021) The likelihood-ratio test for multi-edge network models. J. Phys. Complex. 2 035012.

Acknowledgements

The research and development behind ghypernet is performed at the Chair of Systems Design, ETH Zürich.

Contributors

Giona Casiraghi (project lead)

Vahan Nanumyan

Laurence Brandenberger

Copyright

ghypernet is licensed under the GNU Affero General Public License.

(c) Copyright 2016-2024

r-ghypernet's People

Contributors

gi0na avatar nanumyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

r-ghypernet's Issues

Fix in block omega formatting

Some commits in the master branch are not yet in a package version. They introduce a very helpful bug fix in the formatting of block-omega matrices. Will this fix appear in the next release?

Resolving block IDs in bccm

When printing bccm fits, the entries of the block-Omega matrix are printed in a list. There, pairs of blocks are enumerated as a cryptic number that is difficult to interpret in terms of the block assignment vector that the user has passed when fitting the bccm. The function internally represents each block by a prime number and creates the enumeration of the block-pairs as the product of the two primes of the involved blocks. However, the user usually doesn't know which prime number is assigned to which block.

For example:

library(ghypernet)

data("adj_karate")
data("vertexlabels")

bccm(adj = adj_karate, labels = vertexlabels, directed = FALSE, selfloops = FALSE)

which prints

...
Coefficients:
    Estimate    Std.Err t value    Pr(>t)    
1 1.00000000 0.00000000     Inf < 2.2e-16 ***
2 0.09044494 0.00021692  416.95 < 2.2e-16 ***
4 0.91049902 0.00040434 2251.79 < 2.2e-16 ***
...

Can the output state the block labels instead of the prime products (1, 2, 4) to identify the pairs? For example, something like

1:1
1:2
2:2

where 1 and 2 are the block-labels from vertexlabels.

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.