Skip to main content

NetworkUnit

A SciUnit library for validation testing of spiking networks.

https://readthedocs.org/projects/networkunit/badge/?version=latest

Installation

pip install networkunit

Concept

The NetworkUnit module builds upon the formalized validation scheme of the SciUnit package, which enables the validation of models against experimental data (or other models) via tests. A test is matched to the model by capabilities and quantitatively evaluated by a score. The following figure illustrates a typical test design within NetworkUnit. The blue boxes indicate the components of the implementation of the validation test, i.e., classes, class instances, data sets, and parameters. The relation between the boxes are indicated by annotated arrows.The basic functionality is shown by green arrows. The difference in the test design for comparing against experimental data (validation) and another simulation (substantiation) is indicated by yellow and red arrows, respectively. The relevant functionality of some components for the computation of test score is indicated by pseudo-code. The capability class ProducesProperty contains the function calc_property(). The test XYTest has a function generate_prediction() which makes use of this capability, inherited by the model class, to generate a model prediction. The initialized test instance XYTest_paramZ makes use of its judge() function to evaluate this model prediction and compute the score TestScore. The XYTest can inherit from multiple abstract test classes (BaseTest), which is for example used with the M2MTest to add the functionality of evaluating multiple model classes. To make the test executable it has to be linked to a ScoreType and all free parameters need to be set (by a Params dict) to ensure a reproducible result.

NetworkUnit Flowchart

Showcase examples on how to use NetworkUnit can be found in this repository and interactive reveal.js slides are accessible via the launch-binder button at the top.

Overview of tests

Class name

Parent class

Prediction measure

two_sample_test

-

-

firing_rate_test

two_sample_test

firing rates

isi_variation_test

two_sample_test

inter-spike-intervals, their CV, CV2, LV, or LVR

covariance_test

two_sample_test

covariances

correlation_test

two_sample_test

-

correlation_dist_test

correlation_test

correlation coefficients

correlation_matrix_test

correlation_test

correlation coefficient matrix

avg_std_correlation_test

correlation_test

avg or std of correlation coefficients

generalized_correlation_matrix_test

correlation_matrix_test

matrix of derived cross-correlation measures

eigenvalue_test

correlation_test

eigenvalues of the correlation coefficient matrix

power_spectrum_test

two_sample_test

power spectral density values

freqband_power_test

power_spectrum_test

power spectral density values in frequency band

timescale_test

two_sample_test

spike train timescale

graph_centrality_helperclass

sciunit.Test

graph centrality measures of given adjacency matrix

joint_test

two_sample_test

joining other test classes for multivariate evaluation

Inheritance order in case of multiple inheritance for derived test classes:

class new_test(sciunit.TestM2M, graph_centrality_helperclass, <base_test_class>)

Overview of scores

Class name

Test name

Comparison measure

students_t

Student’t test

sample mean

ks_distance

Kolmogorov-Smirnov test

sample distribution

kl_divergence

Kullback-Leibler divergence

sample entropy

mwu_statistic

Mann-Whitney U test

rank sum

levene_score

Levene’s test

sample variance

effect_size

Effect size

standardized mean

best_effect_size

Bayesian estimation effect size

standardized mean

wasserstein_distance

Wasserstein Distance

multivariate score distance

eigenangle

Eigenangle Test

eigenangle similarity

Overview of model classes

Model name

Capability

Parent class

Purpose

loaded_spiketrains

ProducesSpikeTrains

sciunit.RunnableModel

loading simulated spiking data

stochastic_activity

ProducesSpikeTrains

sciunit.RunnableModel

generating stochastic spiking data

nest_simulation

ProducesSpikeTrains

sciunit.RunnableModel

template for NEST models

Other validation test repositories

Acknowledgments

This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 720270, No. 785907 and No. 945539 (Human Brain Project SGA1, SGA2 and SGA3).

Metadata

Release files for networkunit 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for networkunit 0.2.2
File Size Uploaded
networkunit-0.2.2.tar.gz 45.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for networkunit 0.2.2
File Interpreter ABI Platform
networkunit-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 113.3 kB

Release files / networkunit-0.2.2.tar.gz

Download URL networkunit-0.2.2.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f0ada132cd73078a5ea6ddb60e2c642e6d59355cd90fbdd57cb233116f58f929
BLAKE2b-256 checksum
How to use checksums
4d717f9b5480d2338c2b639dd7a4a54a9abd7f4f3c7f17cb7b57ebaed287aab2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.13

Release files / networkunit-0.2.2-py3-none-any.whl

Download URL networkunit-0.2.2-py3-none-any.whl
Size 67.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca24428cb64d4b83102f0bd0b29ec2477246fb833782f4b441837bea486c83e3
BLAKE2b-256 checksum
How to use checksums
0f02d866a71236226b3821709691dc2ef0791cb283c2347130ba0aba01033f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.13

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page