{"id":38553666,"url":"https://github.com/compnet/signedcentrality","last_synced_at":"2026-01-17T07:38:46.350Z","repository":{"id":145486548,"uuid":"268765004","full_name":"CompNet/SignedCentrality","owner":"CompNet","description":"Centrality measures for signed networks","archived":false,"fork":false,"pushed_at":"2022-03-14T08:37:49.000Z","size":9435,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-10T05:08:19.974Z","etag":null,"topics":["centrality-measure","graph-prediction","signed-graphs"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CompNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-02T10:01:39.000Z","updated_at":"2025-08-12T19:09:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"4afe1d5c-f7a3-4d3d-aa8e-6c6e7a9551f2","html_url":"https://github.com/CompNet/SignedCentrality","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CompNet/SignedCentrality","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompNet%2FSignedCentrality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompNet%2FSignedCentrality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompNet%2FSignedCentrality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompNet%2FSignedCentrality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CompNet","download_url":"https://codeload.github.com/CompNet/SignedCentrality/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompNet%2FSignedCentrality/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centrality-measure","graph-prediction","signed-graphs"],"created_at":"2026-01-17T07:38:46.263Z","updated_at":"2026-01-17T07:38:46.325Z","avatar_url":"https://github.com/CompNet.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SignedCentrality\n\nCentrality measures and prediction tasks for signed networks\n\n* Nejat Arinik [nejat.arinik@inrae.fr](mailto:nejat.arinik@inrae.fr)\n* Vincent Labatut [vincent.labatut@univ-avignon.fr](mailto:vincent.labatut@univ-avignon.fr)\n* Rosa Figueiredo [rosa.figueiredo@univ-avignon.fr](mailto:rosa.figueiredo@univ-avignon.fr)\n\n\n\n## Description\n\nThis set of `Python` scripts/modules is designed for two main purposes:\n\n* implementing centrality measures for signed networks\n* performing some prediction tasks, such as classification and regression, based on the features extracted from signed centrality measures or other graph-related measures/statistics. \n\n\n\n## Data\n\nIn order to compute centrality measures or to perform some prediction tasks, we include a sample dataset in the folder `in`. It is a part of the full training dataset used in our article: *Space of optimal solutions of the Correlation Clustering problem* (Arinik, Nejat; Labatut, Vincent, Figueiredo, Rosa (2020): Space of optimal solutions of the Correlation Clustering problem on Complete Signed Graphs. figshare. We also extended this dataset with incomplete signed networks. The final dataset can be found on [FigShare](https://doi.org/10.6084/m9.figshare.19350284).\n\n\n\n## Organization\n\n* Folder `in`: input signed networks.\n\n* Folder `out`: contains the files produced by our scripts\n\n* Folder `src`: \n\n  * Folder `descriptors`: this folder contains three groups of measures: 1) centrality, 2) node embeddings, and 3) graph embeddings.\n  * Folder `collect`: the scripts of this folder aim at collecting the statistics/measures which are already computed and stored in folders.\n  * Folder `prediction`: this folder contains the scripts performing the prediction tasks, such as classification and regression.\n  * Folder `stats`: this folder contains some graph-related statistics, e.g. spectral, structural, structural balance.\n\n* Folder `tests`: \n\n  * Folder `centrality`:  All the unit and integration tests related to signed centrality measures.\n  * Folder `stats`: All the unit and integration tests related to graph-related statistics.\n  * Folder `graph_embeddings`: All the unit and integration tests related to signed graph embeddings.\n  * Folder `node_embeddings`: All the unit and integration tests related to signed node embeddings.\n\n* There are 4 main files.\n\n  * `main_feature_and_output_extraction.py`: It processes the features and the outputs.\n  * `main_binary_classification.py`: It performs the binary classification task.\n  * `main_ordinal_classification.py`: It performs the ordinal classification task.\n  * `main_regression.py`: It performs the regression task.\n\n\n\n## Installation\n\n* Install Python (tested with Python 3.8.12)\n\n* Install dependencies using the following command:\n\n  ```\n  pip install -r requirements.txt\n  ```\n\n* Download this project from GitHub\n\n* You need to retrieve the data from [Figshare](https://doi.org/10.6084/m9.figshare.19350284). Download and untar `Input Signed Networks.tar.gz` and `Evaluation Results.tar.gz`.  Place them into the `in` and `output/evaluate-partitions` folders, respectively. Finally, we might need to configure the input parameters, i.e. the global variables such as `GRAPH_SIZES`, in the main files. You do not need to change these input parameters, if you work with the whole dataset. \n  \n\n\n## How to run ?\n\n### Use Case 1: The whole workflow -\u003e 1) Extracting features and output variables, 2) Performing prediction tasks\n\n* Go to the folder `src`.\n\n* We run the file `main_feature_and_output_extraction.py` inside the folder `src`. Or, you can configure the `PYTHONPATH` variable, if you do not want to run it from the folder `src`. Note that it can take several hours.\n\n* Apply the use case 2\n\n\n\n### Use Case 2: Performing prediction tasks\n\n* If you skip the use case 1, then you need to download and untar `csv.tar.gz` from [Figshare](https://doi.org/10.6084/m9.figshare.19350284). Place it into the `out/csv` folder.\n\n* Go to the folder `src`.\n\n* We run the files `main_binary_classification.py`, `main_ordinal_classification.py` and `main_regression.py` inside the folder `src`. Or, you can configure the `PYTHONPATH` variable, if you do not want to run it from the folder `src`.\n\n\n\n\n## To-do list\n\n* add more signed centrality measures\n* add more graph-related statistics\n* add some signed node embeddings\n* add some signed graph embeddings\n* add ordinal logistic regression from the package [statsmodels](https://www.statsmodels.org/devel/examples/notebooks/generated/ordinal_regression.html)\n* add recursive feature selection method from the package [scikit-learn](https://scikit-learn.org/stable/modules/feature_selection.html#rfe)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompnet%2Fsignedcentrality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompnet%2Fsignedcentrality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompnet%2Fsignedcentrality/lists"}