Giter Club home page Giter Club logo

pymuvr's Introduction

pymuvr

Overview

build status

Multi-unit Van Rossum spike train metric. This is a kernel-based implementation with markage vector and precomputed exponential factor, as described in Houghton and Kreuz, 2012, 'On the efficient calculation of Van Rossum distances.'. This package started out as a Python wrapping of the original C++ implementation given by the authors of the paper, and evolved from there with bugfixes and improvements.

Documentation

Full documentation is hosted at http://pymuvr.readthedocs.org/

Requirements

  • Python 2.7 or 3.x.
  • NumPy>=1.7.
  • C++ development tools and Standard Library (package build-essential on Debian).
  • Python development tools (package python-dev on Debian).

Installation

To install the latest release, run:

pip install pymuvr

If you prefer installing from git, use:

git clone https://github.com/epiasini/pymuvr.git
cd pymuvr
python setup.py install

Note that you'll get testing and benchbark scripts only if you install manually (i.e. not via pip).

Usage

The module exposes two functions:

pymuvr.distance_matrix(parallel_trains_1, parallel_trains_2, cos, tau)
pymuvr.square_distance_matrix(parallel_trains, cos, tau)

distance_matrix calculates the 'bipartite' (rectangular) dissimilarity matrix between the trains in parallel_trains_1 and those in parallel_trains_2.

square_distance_matrix calculates the 'all-to-all' dissimilarity matrix between each pair of trains in parallel_trains. It's an optimised form of distance_matrix(parallel_trains, parallel_trains, cos, tau).

They both return their results as a 2D numpy array.

The parallel_trains arguments must be thrice-nested lists of spiketimes, in such a way that parallel_trains[i][j][k] represents the time of the kth spike of the jth cell of the ith train. cos and tau are the usual parameters for the multiunit Van Rossum metric.

See examples/benchmark_versus_spykeutils.py for an example of usage comparing the performance of pymuvr with the pure Python implementation of the multiunit Van Rossum distance in spykeutils.

License

This package is licensed under version 3 of the GPL or any later version. See COPYING for details.

pymuvr's People

Contributors

epiasini avatar rproepp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.