Skip to main content

A SciUnit library for validation testing of neural network models.

Project description

A SciUnit library for validation testing of spiking networks.

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

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

-

-

correlation_test

two_sample_test

-

correlation_dist_test

correlation_test

correlation coefficients

correlation_matrix_test

correlation_test

correlation coefficient matrix

generalized_correlation_matrix_test

correlation_matrix_test

matrix of derived cross-correlation measures

eigenvalue_test

correlation_test

eigenvalues of the correlation coefficient matrix

covariance_test

two_sample_test

covariances

firing_rate_test

two_sample_test

firing rates

isi_variation_test

two_sample_test

inter-spike-intervals, their CV, or LV

graph_centrality_helperclass

sciunit.Test

graph centrality measures of given adjacency matrix

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

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

networkunit-0.2.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

networkunit-0.2.0-py3-none-any.whl (2.6 MB view details)

Uploaded Python 3

File details

Details for the file networkunit-0.2.0.tar.gz.

File metadata

  • Download URL: networkunit-0.2.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for networkunit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eb709eaba07d0f7a0a203eaade531729e8c1677c681d0905e90933c8b3c4de98
MD5 cf736fca2ef1bd7cc33af0935b7be184
BLAKE2b-256 36ca560fb4b9c8aa4901c322a076f5621534c81427fe6013fa2bb36e8b43f258

See more details on using hashes here.

File details

Details for the file networkunit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: networkunit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for networkunit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea3844316ef9e64324b5e1da1d4a2f3168f737ebe9e3a3255c159afc6e2cca7c
MD5 8428ae6dd5f8810501a6e0e1e7295561
BLAKE2b-256 9c3b5cfe3f7d6df46a0c14cb97ef05e34c4b4a3db9024f40302bb15fc892f4a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page