{"id":15657436,"url":"https://github.com/carlonicolini/communityalg","last_synced_at":"2025-05-05T03:25:27.530Z","repository":{"id":147729998,"uuid":"44736154","full_name":"CarloNicolini/communityalg","owner":"CarloNicolini","description":"Algorithms and functions in Matlab for community detection in networks. Expands BrainConnectivity toolbox","archived":false,"fork":false,"pushed_at":"2019-07-08T14:50:47.000Z","size":8636,"stargazers_count":26,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T21:41:29.235Z","etag":null,"topics":["brain-network","community-detection","graph-theory"],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarloNicolini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-10-22T09:42:16.000Z","updated_at":"2024-03-19T15:12:53.000Z","dependencies_parsed_at":"2023-05-27T07:49:22.118Z","dependency_job_id":null,"html_url":"https://github.com/CarloNicolini/communityalg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarloNicolini%2Fcommunityalg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarloNicolini%2Fcommunityalg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarloNicolini%2Fcommunityalg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarloNicolini%2Fcommunityalg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarloNicolini","download_url":"https://codeload.github.com/CarloNicolini/communityalg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252431301,"owners_count":21746820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["brain-network","community-detection","graph-theory"],"created_at":"2024-10-03T13:07:02.555Z","updated_at":"2025-05-05T03:25:27.509Z","avatar_url":"https://github.com/CarloNicolini.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# communityalg\nAlgorithms and functions in Matlab for community detection in networks. \nExpands BrainConnectivity toolbox.\n\n# Matlab/Octave algorithms and functions\n\n- **ami.m** Returns the adjusted mutual information between two membership vectors.\n- **association_score.m** Returns the association score between pairs of communities specified by the graph and membership.\n- **asymptotic_modularity.m** Compute asymptotic modularity of a graph with respect to a membership vector.\n- **asymptotic_modularity_sum.m**  TODO\n- **asymptotic_surprise.m** Compute asymptotic surprise of a graph with respect to a membership vector.\n- **clique.m** Generate an adjacency matrix of a clique graph with `n` nodes.\n- **cluster_similarity.m** Compare two membership vectors.\n- **clustering_entropy.m** Compute the clustering entropy of an agreement matrix as in \"Gfeller, Newman, 2006\".\n- **community_robustness_weighted.m** TODO\n- **community_size2memb.m** Convert an array where every element is the size of a clique to the correspondig membership vector.\n- **comm_mat.m** Returns the block matrix of a graph and its community structure as membership.\n- **compute_surprise.m** Compute the surprise given surprise paramenters.\n- **consensus_clustering.m** TODO\n- **consensus_clustering_weighted.m** TODO\n- **consensus_entropy.m** TODO\n- **consensus_robustness.m** TODO\n- **correlation_louvain.m** Adaptation of the BCT `community_louvain` method for correlation matrices, as described in MacMahon,2015.\n- **count_comm.m** Plot the histogram with the community size given a membership vector.\n- **cycle_graph.m** Generate the adjacency matrix of a cycle graph with n nodes.\n- **effcommplot.m** TODO\n- **generate_agreement.m** Generate the agreement matrix for a given community detection method.\n- **generate_agreement_weighted.m** Generate the weighted agreement matrix for a given community detection method.\n- **generate_connected_components.m** TODO\n- **graph_JS_similarity.m** Compute the quantum Jensen Shannon divergence between two adjacency matrices.\n- **graph_laplacian.m** Compute the graph combinatorial Laplacian matrix `L=D-A`.\n- **group2membership.m** Convert a cell of arrays representing the nodes in the communities to a membership vector.\n- **image_to_network.m** Convert a gray index image to its corresponding adjacency graph.\n- **imagesctxt.m** Show a matrix like `imagesc` but with text values of elements displayed on the pixels.\n- **isoctave.m** Returns true if using Octave, false if using Matlab.\n- **jensen_shannon_sim.m** Returns the Jensen-Shannon symmetrized information theoretic distance between two graph Laplacians.\n- **k_regular.m** Generate a `k`-regular graph, a graph where the degree of every vertex is `k`.\n- **KL.m** Returns the binary Kullback-Leibler divergence between Bernoulli distribution `p` and `q`.\n- **kullback_leibler_sim.m** Returns the Kullback-Leibler divergence between two graph Laplacians.\n- **logHyperProbability.m** Compute the logarithm of the hypergeometric probability in base 10.\n- **membership2groups.m** Convert a membership vector to a cell of arrays of nodes in every community.\n- **membership_agreement.m** DEPRECATE\n- **membership_similarity.m** TODO\n- **method_best.m** Functio handle to the community detection method that returns the best value over a set of repetitions.\n- **modularity.m** Returns the modularity of a graph with respect to a membership vector.\n- **nearcorr.m** Returns the nearest correlation matrix of a square matrix. Implementation by Nick Higham.\n- **nearestSPD.m** Returns the positive definite matrix of a square matrix. Implementation by Nick Higham.\n- **norm_conf_mat.m** DEPRECATE\n- **number_connected_components.m** Returns the number of connected components of a graph.\n- **number_of_edges.m** Returns the number of edges of a binary or weighted graph.\n- **paco.m** Function handle to the MEX implementation of PACO.\n- **partition_params.m** Returns the partition parameters for use with `compute_surprise`.\n- **quantum_density.m** Returns the quantum density of a graph, `Brauenstein et al.` \"Ann. of Combinatorics, 10, no 3 (2006), 291-317.\"\n- **reindex_membership.m** Transform a membership vector to have community indices sorted by community size from `1` to `|C|`\n- **reorder_membership.m** Linearize a membership vector to have continuous indices of communities from `1` to `|C|`\n- **ring_of_cliques.m** Returns a  network ring of cliques, with given number of cliques and clique size and its membership.\n- **ring_of_custom_cliques.m** Returns a network ring of cliques, with given size of cliques specified as input and its membership.\n- **rmtdecompose.m** Returns the Random Matrix Theory decomposition of a correlation matrix.\n- **robustness_configuration_interp_und.m** \n- **robustness_edge_weight_und.m**\n- **run_cluster_similarity.m**\n- **rwalkent.m** Returns the random walk entropy of a graph as in `Estrada et al.` Walk entropies in graphs, \"Linear Algebra and its Applications 443 (2014) 235–244\"\n- **significance.m** Returns the significance of a graph partitioning, `Traag (2013)`.\n- **smi.m** Returns the standardized mutual information of two membership vectors.\n- **sort_group_by_size.m**  Sort community groups by size.\n- **star_of_custom_cliques.m** Returns a star of cliques, every clique is connected to all other cliques with one edge.\n- **surprise.m** Returns the surprise of a graph partitioning.\n- **threshold_by_giant_component.m** Returns the threshold over which the graph has more than one connected component.\n- **threshold_by_num_edges.m** Returns a graph thresholded to have a specific number of edges.\n- **vonneumann_entropy.m** Returns the VonNeumann quantum entropy of graph `Brauenstein et al.` \"Ann. of Combinatorics, 10, no 3 (2006), 291-317.\"\n- **write_brainet.m** Write a graph with coordinates of nodes and membership to Brainet format.\n- **write_brainet_community.m** TODO\n- **writetoEdgesList.m** TODO\n- **writetoPAJ_labels.m**\n- **writetoPAJ_labels_coords.m**\n\n# Python algorithms\n- **find_intersections.py** Find the intersections of edges in a bipartite graph (TODO)\n\n# Datasets\nThis repository contains the 638 areas template used by Crossley (2013). It consists of two files:\n\n1. `template.nii` is the NIFTI file describing the template, MNI space\n2. `template_638.txt` is the description of anatomical a\n\n\nAdditionally the file `template_638_coords_abbr.txt`  is organized as follows\n\n| Node |  X | Y | Z | Label | Abbr|\n|------|----|---|---|-------|-----|\n\n\nand differently from `template_638.txt` the NodeID starts from 0 to 637 (for indexing with Python).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlonicolini%2Fcommunityalg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlonicolini%2Fcommunityalg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlonicolini%2Fcommunityalg/lists"}