Science Score: 64.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Repository
nSBM: multi branch topic modeling
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
- Releases: 18
Topics
Metadata Files
README.md
multipartite Stochastic Block Modeling
Inheriting hSBM from https://github.com/martingerlach/hSBM_Topicmodel extends it to tripartite networks (aka supervised topic models)
The idea is to run SBM-based topic modeling on networks given keywords on documents

Install
With pip
bash
python3 -m pip install . -vv
With conda/mamba
bash
conda install -c conda-forge nsbm
Example
```python from nsbm import nsbm import pandas as pd import numpy as np
df = pd.DataFrame( index = ["w{}".format(w) for w in range(1000)], columns = ["doc{}".format(d) for d in range(250)], data = np.random.randint(1, 100, 250000).reshape((1000, 250)))
dfkeylist = []
keywords
dfkeylist.append( pd.DataFrame( index = ["keyword{}".format(w) for w in range(100)], columns = ["doc{}".format(d) for d in range(250)], data = np.random.randint(1, 10, (100, 250))) )
authors
dfkeylist.append( pd.DataFrame( index = ["author{}".format(w) for w in range(10)], columns = ["doc{}".format(d) for d in range(250)], data = np.random.randint(1, 5, (10, 250))) )
other features
dfkeylist.append( pd.DataFrame( index = ["feature{}".format(w) for w in range(25)], columns = ["doc{}".format(d) for d in range(250)], data = np.random.randint(1, 5, (25, 250))) )
model = nsbm() model.makegraphmultipledf(df, dfkey_list)
model.fit(ninit=1, Bmin=50, verbose=False) model.save_data() ```
Run with Docker
bash
docker run -it -u jovyan -v $PWD:/home/jovyan/work -p 8899:8888 docker.pkg.github.com/fvalle1/trisbm/trisbm:latest
If a graph.xml.gz file is found in the current dir the analysis will be performed on it.
Tests
bash
python3 tests/run_tests.py
Caveats
Please check this stuff in your data:
- there should be no zero-degree nodes (all nodes should have at least one link)
- there shouldn't be any duplicate node
- The make_form_BoW_df function discretises the data
Documentation
License
See LICENSE.
This work is in part based on sbmtm
Third party libraries
This package depends on graph-tool
Owner
- Name: Filippo Valle
- Login: fvalle1
- Kind: user
- Location: Turin, Italy
- Company: @Elemento-Modular-Cloud
- Website: https://fvalle.online
- Repositories: 69
- Profile: https://github.com/fvalle1
Chief Technology Officer of @Elemento-Modular-Cloud | Complex Systems researcher @BioPhys-Turin
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Valle" given-names: "Filippo" orcid: "https://orcid.org/0000-0003-3577-8667" title: "nsbm" version: 1.0.0 doi: 10.5281/zenodo.5045445 date-released: 2021-06-30 url: "https://github.com/fvalle1/nsbm"
GitHub Events
Total
- Release event: 1
- Push event: 2
- Create event: 1
Last Year
- Release event: 1
- Push event: 2
- Create event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Filippo Valle | f****e@t****t | 76 |
| Filippo Valle | f****e@u****t | 36 |
| Filippo Valle | f****e@e****t | 33 |
| Filippo Valle | f****e@t****t | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 2 years ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- fvalle1 (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
conda-forge.org: nsbm
Package to run n-partite Stocastich Block Modeling.
- Homepage: https://github.com/BioPhys-Turin/nsbm
- License: GPL-3.0-only
-
Latest release: 0.5.1
published almost 4 years ago
Rankings
Dependencies
- cloudpickle *
- matplotlib *
- numpy *
- pandas *
- actions/checkout v2 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- jupyter/datascience-notebook latest build
- cloudpickle *
- pandas *