NNGT

Unified generation and analysis of networks in Python, with neuroscientific additions

Downloads
1.1K
Stars
14
Committers
3

Bot releases are hidden (Show)

NNGT - Version 2.7.0: REUSE, install and backend updates Latest Release

Published by tfardet over 1 year ago

Support graph-tool >= 2.4.6
Support networkx >= 3
Move to pyproject.toml
Make project REUSE compliant

Fix bug for igraph node attributes

NNGT - Version 2.5.2: improve Shapely and GraphML support

Published by tfardet almost 3 years ago

This bugfix version upgrades the geometry submodule to make it ready for the upcoming 2.0 version of Shapely.
It also improves the GraphML IO functions so that they support graphs with missing attributes.

This is mostly a bugfix version but it also introduces harmonic centrality support with igraph and node annotations on plots.

New features

  • Support for harmonic centrality with igraph (52aec27d).
  • Node annotations when hovering on nodes in plots (81c7da08)

Enhancement

Circular self-loops on network plots (81c7da08).

Bugfixes

  • Fix curved edges and sizes (81c7da08)
  • improved spatial support (to_undirected and Graph init, e83fd6a4)
  • Fix spectral radius for unweighted graphs (f2dc429c)
  • Fix save_spikes and receptor port support with NEST (f2dc429c)
NNGT - Version 2.5.0: sparse clustered graphs and improved backend support

Published by tfardet about 3 years ago

This new version adds support for NetworkX 2.6+, introduces a new network model, improves IO and plotting modules, and extends the list of functions that are supported by the default backend (if networkx, igraph, and graph-tool are not installed on the system).

New features

  • sparse_clustered: it is now possible to generate sparse graphs with a desired clustering coefficient, this comes with an associated rewiring scheme (f45d0a9b)
  • support for GraphML file format (a9f8710d)
  • support for NetworkX 2.6+ (f4e5002e)

Enhancements

  • More efficient edge attribute access (speed and memory improvements, c8f29951)
  • Improved plots (color and size support for nodes and edges, visible arrows for directed networks..., 7f5340b8 & ccdd627f)
  • Add connectedness test with nngt default backend (d3979a15)

Bugfixes

Correct delete_edges for nngt backend that did not update the node degrees (b1ca08df).

NNGT - Version 2.4.0: Geospatial data and NEST3 support

Published by tfardet over 3 years ago

This new release brings the possibility to plot graph together with geospatial data and adds support for the new NEST 3 release.

New features

  • the geospatial module and its draw_map function.
  • support for NEST 3

Enhancements

  • faster and more versatile get_edges function
  • improved support of undirected graphs with non-positive weight attributes
  • check for ununsed keywords arguments when creating Graph objects

Bugfixes

  • Correct SWP if deviations are negative
  • default NeuralGroup is excitatory
  • fix Structure.create_meta_group
  • fix error in new_edges for empty edge list
NNGT - NNGT 2.3.0: improved (undirected) analysis and plots

Published by tfardet over 3 years ago

This new release includes a lot of bugfixes and under-the-hood improvements as well as a set of new tools for better analysis, especially with undirected measures.

All testing and main code hosting has been moved to SourceHut and the documentation has been updated and now includes an automatic dark theme for all browser requesting it.

New features

  • to_undirected method, to create undirected counterparts from directed (even weighted) networks (patch 20376)
  • local_closure as a complementary tool for clustering (#155), see [Yin2019]
  • Zhang--Horvath method for weighted clustering (#146), see [Zhang2005]

Enhancements

  • improved support for positions/structures (#149)
  • improved from_matrix class method to support all Graph arguments (#149)
  • improved plots: positional layout and opacity (#149):
    • layout can now be a list of custom positions.
    • added ealpha and nalpha support for edge and node transparency.
  • shortest path and path length method can be used in "undirected" mode on directed weighted networks (patch 20470)

Bugfixes

  • corrected calculation of weighted path length for SWP (patch 20470)
  • fixed circular graph and lattice reciprocity (patch 20412)
  • corrected spatial plots with networkx (#154)
  • fixed IO issue with non-string node attributes (#152)
  • fixed nonstring_container import for RNGs (#151)
  • fixed edge deletion with nngt backend (#149)

Breaking change

Default mode for SWP is now to use the average local clustering instead of the global clustering.

NNGT - NNGT 2.2.1: bugfixes for edge deletion, addition of Price network

Published by Silmathoron almost 4 years ago

This release fixes several issues with edge deletion on all backends except networkx (see #137 and #141).
It also corrects several issues with the connector functions (#145).
Finally, it also shows the addition of the Price connectivity scheme with some generalizations (#138 and #139).

Most of all, it will fix the PyPi issue regarding the plot module, since I forgot to add the new mpl_chord_diagram submodule in the previous release, making the plot module unusable.

NNGT - NNGT 2.2.0: hive plots, chord diagrams and improved graph structuring

Published by Silmathoron almost 4 years ago

This new release of NNGT brings about a set of new plotting functions and better functionalities for non-neuronal structured graphs through the Structure and Group classes and the get_structure_graph function.

New features:

  • Addition of hive plots (#108)
  • Add chord diagrams from mpl_chord_diagram (#107)
  • Add Structure/Group classes for non-neuronal ensembles and structure graph to analyze connections between groups (#105 & #107)
  • (Neural)Groups get an add_nodes method (#110)

Enhancements:

  • Speedup get_edges (#132)
  • Added edge and node deletion methods (#129)
  • Improved plots and created documentation gallery (#109)

Bugfixes:

  • correct "eid" attribute issue when copying graphs (#134)
  • correct global clustering for unweighted directed networks (#131)
  • fix io string issue for node/edge attributes and node/edge deletion (#103 & #130)
  • fix returned degrees and clustering for a subset of nodes (#126)
  • proper copy of returned attributes with graph-tool (#125)
  • correct save_spikes (#122)
  • fix delays setting (#121)
  • correct graph loading with 0-out-degree neighbour lines (#118)
  • fix undirected clustering for weighted directed networks (#112)
  • fix loading with from_matrix (#112)
  • get_edges with source/target node for undirected graphs (#102)
NNGT - NNGT 2.1.0: introducing partial clustering for directed graphs

Published by Silmathoron about 4 years ago

Version 2.1 further extends the normalized graph analysis methods with the addition of partial clustering coefficient for directed graphs.
It also notably improves plotting and support of undirected networks.

New features:

  • Added cycle, middleman, fan-in and fan-out clustering versions for directed graphs.

Enhancements:

  • connect_* functions now return only the newly created edges when some edges are dropped due to ignore_invalid argument
  • make_spatial now works properly when only positions are provided during graph initialization.
  • improved graph drawings:
    • corrected restrict nodes
    • add restrict_edges
    • improved fast plot (markers)
    • add colorbar label
    • improved color support (html, vectors)

Bugfixes:

  • lattice_rewire now works for undirected networks for any number of edges (and not only when the edge number matches that of a regular lattice)
  • correct weight initialization with distributions and loading
  • Fixed the copy method:
    • correct initialization of edge attributes upon graph copy
    • solved issue with copy of undirected graphs becoming directed upon copy
    • use of copy is now forbidden with MPI
NNGT - 2.0.1 patch: install and RNGs on windows

Published by Silmathoron over 4 years ago

This patch simply fixes the installation on Windows as well as random generators seeding on this platform.
For an overview of the latest changes associated to the move to major version 2.0, please see the 2.0.0 release.

NNGT - NNGT 2.0: full frontend for simple graphs, unified graph analysis

Published by Silmathoron over 4 years ago

With the 2.0 release, NNGT moves from inheritance to composition for the underlying graphs.
This enables improved support of both directed and undirected networks on all backends.
The second major feature is the introduction of "normalized" graph analysis tools with explicit definitions so that the results returned are always the same regardless of the backend.

New features

  • New graph generation methods: circular_graph, from_degree_list, and watts_strogatz.
  • Rewiring functions (randomization and latticization).
  • New analysis functions: connected_components provides detailed information on the nodes in each component, is_connected function (check for single component), shortest paths and distance algorithms, neighbours method, small_world_propensity for directed weighted graphs.
  • Clustering methods for weighted and directed graphs.
  • Graph visualization using the libraries' methods.
  • Underlying library graph is now freely accessible via the graph property (use responsibly)
  • "total-degree" constraint is available for degree-generation methods
  • Complete versatility of the new_edge/new_edges functions for the checks:
    • for existing edges or duplicates in the list
    • for self-loops
    • possibility to silently ignore invalid edges

Enhancement

  • RNG and seeds.
  • NEST import is now lazy.
  • Format choice for adjacency matrix (dense matrix and all scipy.sparse formats).
  • Improved I/O: support for GML format and custom edge-list files.
  • Automatic addition of the edge distances for SpatialGraph objects.

Breaking changes

Under the hood, the library underwent some major restructuring, which led to the decision of introducing some important breaking changes.

  • Drop support for Python 2.
  • Removal of num_wcc and num_scc in favour of connected_components.
  • replaced "syn_type" arguments by "edge_type".
  • replaced "use_weights" arguments by "weights".

Bugfixes

  • Weight change with nngt backend.
  • Proper support for undirected graphs.
  • Corrected generation functions for undirected graphs (notably Newman-Watts and Erdos-Renyi).
  • Fixed all functions raising errors with networkx.
  • Errors in edge/node attributes handling with some backends.
NNGT - Version 1.3.2: correct bug using set_weights with "nngt" backend

Published by Silmathoron over 4 years ago

This patch fixes an issue affecting the "nngt" backend (for users not using any of the standard graph libraries) that led to weights set after edge creation (using set_weights) to be incorrectly updated in some cases, notably when using NNGT with NEST.

(note that the Travis test for graph-tool on Python 2 fails solely because Tiago is no longer supporting it and removed the package from his repo, it is not linked to any issue with this release)

NNGT - Version 1.3.1: bugfix on fixed/Gaussian

Published by Silmathoron over 4 years ago

This patch fixes a bug using the fixed_degree or gaussian_degree methods on different sources and target neurons with one of the following functions:

  • connect_groups, connect_neural_groups
  • connect_neural_types
  • connect_nodes

It also deprecates connect_neural_groups in favour of connect_groups.

NNGT - Version 1.3.0: updated backends, groups and improved documentation

Published by Silmathoron over 4 years ago

NB: this release will be the last one supporting python 2 and NEST 2, starting NNGT 2.0, only python 3 and NEST 3 will be supported.
EDIT: due to delays in the release of NEST3, support for NEST2 was maintained in NNGT 2.

Improvements:

  • support for networkx 2.4
  • added MetaGroup class
  • added excitatory/inhibitory access for NeuralPop and MetaGroup

Bugfixes:

  • corrected betweenness for all backends
  • corrected multiple node access for degrees in "nngt" backend
  • corrected plot import for simulation module

Deprecations:

  • sunsetting Python 2
  • deprecated nest_gid in favor of nest_gids

Under the hood:

  • Improved testing and coverage
  • switched to sets in generation algorithms
NNGT - Version 1.2.1: corrected pip install and minor changes

Published by Silmathoron almost 5 years ago

Breaking change: decimate converted to decimate_connections in plot functions.

Various corrections:

  • improved setup for NEST loading
  • set binsize to int in total_firing_rate
  • improved data management and pip install correction
NNGT - Version 1.2.0: metagroups + full attributes tests and support

Published by Silmathoron about 5 years ago

This new version vastly improves the support of the backends with respect to node and edges attributes.
It also introduces new metagroup objects for even better network generation.
Finally, it comes with a refreshed and enriched documentation.

Breaking changes:

  • ntype was switched to neuron_type for NeuralGroup and NeuralPop
  • create_group takes neurons as first parameters and name as second

Improvements:

  • full attributes support (including strings and objects) for all backends
  • addition of metagroups
  • new get_nodes and get_edges functions
  • improved plotting and histogram readded
  • enriched and updated documentation and tutorials
  • larger coverage (now at 30%)

Bugfix:

  • corrected multiple issues with networkx and nngt backends
  • fixed all attribute-related issues
  • corrected IO for Network with NeuralPop
NNGT - Version 1.1.0: improved multiplatform install

Published by Silmathoron over 5 years ago

This new version provides a working multithreading install on Windows, as well as several improvements and bugfixes.

Breaking change: for interactions with NEST, the set_minis has been change to have independent weight for the noise.

Improvements:

  • Improved and corrected draw_network, plot_activity, and animation
  • IO now save and load properly the areas of a Shape

Bugfix:

  • Corrected error in distance-rule with OpenMP
  • Corrected error in betweenness with igraph
  • Corrected neighbors with networkx
  • Fixed crash with sorting method

Notes:

  • I realized that GitHub does not include the submodules in the release archives; starting now, I will also include the .tar.gz and .zip archives containing the same files as the corresponding version of NNGT on PyPi.
  • For installation, it is now recommended to install directly through pip.

To install via pip, use either

pip install --user nngt

or

sudo pip install nngt
NNGT - Patch 1.0.1

Published by Silmathoron over 6 years ago

Various corrections and improvements.

Improvements

  • plot_activity has axis keyword and better color handling
  • get_weights/delays/types support partial edges query
  • draw_network with colorbar

Bugfix

  • edge_list and neighbour_list attributes saving
  • problems with network saving in db
  • get_weights
  • get_node_attributes
  • nx edges_attributes and BaseGraph new_edge_attr
  • inverted in/out neighbours for igraph
NNGT - First full release: 1.0.0

Published by Silmathoron over 6 years ago

I think NNGT is now fully release ready, so this is officially 1.0.0.
You can now install it from pipy using pip on any platform.

Changelog:

  • Updated documentation
  • Improved config
  • New load_from_file function
  • Added check for duplicated edges (in the newly added edges only) + empty edges addition in new_edges
  • Wrapped NEST functions to improve interactions (groups and network.nest_gids are now reset by nest.ResetKernel)
  • Support for non-scalar arguments in neuron_params when creating nest network
  • set_minis now take synaptic type into account (different call for mEPSCs/mIPSCs)
  • Improved graph libraries handling for new edges
  • Corrected "neighbout list" IO (errored)
  • Corrected database to work with peewee>=3
  • Corrected network plotting
  • Icreased testing
  • logging is always on a single MPI process
  • corrected mpi checker
NNGT - Version 1.0 alpha release

Published by Silmathoron over 6 years ago

New default backend, which does not require any additional graph library.
Allows for fully distributed graph generation and storage to use with NEST on clusters.

Full I/O is now available with shape and population included in the file.
MPI-parallel I/O was also added.

Gaussian-degree is now available for MPI generation, in addition to distance-rule, which now includes a Gaussian kernel.

Package Rankings
Top 13.27% on Pypi.org
Related Projects