Giter VIP home page Giter VIP logo

gorkamunoz / andi_datasets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andichallenge/andi_datasets

1.0 1.0 0.0 1.15 MB

ANDI provides the necessary functions to generate, save, load and manipulate datasets of diffusion anomalous trajectories. It is part of the Anomalous Diffusion (ANDI) Challenge.

Home Page: https://competitions.codalab.org/competitions/23601

License: MIT License

Jupyter Notebook 79.41% Python 20.59%

andi_datasets's Introduction

The Anomalous Diffusion (AnDi) Challenge datasets

This repository contains the necessary functions to generate datasets of trajectories for the Anomalous Diffusion (AnDi) Challenge. The andi-datasets package allows to generate a dataset of trajectories generated according to various diffusion models, either in one, two or three dimensions. You can Install the package using:

pip install andi-datasets

You can then Import the package in a Python3 environment using:

import andi

Functions organization

The ANDI class allows to generate, save and load trajectories generated with various diffusion models. Its main purpose is to generate datasets similar to the ones proposed in the ANDI challenge. Moreover, it also allows to generate datasets of trajectories of various kinds, depending on the needs of the user.

Examples of use of the class and more detailed descriptions of all the functions can be found in the notebook examples_andi.ipynb.

Available models:

The diffusion models considered in ANDI are all contained in the class diffusion_models and can also be found in functions/diffusion_models.py. They are organized in three subclasses, depending of the dimensions of the mode: oneD, twoD, threeD.

  • One dimension
    • Continuous time random walk
    • Fractional Brownian motion
    • Lévy walk
    • Annealead transit time
    • Scaled Brownian motion
  • Two dimensions
    • Continuous time random walk
    • Fractional Brownian motion
    • Lévy walk
    • Annealead transit time
    • Scaled Brownian motion
  • Three dimensions
    • Continuous time random walk
    • Fractional Brownian motion
    • Lévy walk
    • Annealead transit time
    • Scaled Brownian motion

Properties of diffusion models

Each of the models available in the andi package are created by a function which has the properties introduced below (please follow this same structure, also if you want to contribute additional diffusion models).

  • Keyboard inputs (i.e. compulsory inputs, the functions may have as many optional inputs as you want):
    • T: the length of the trajectory.
    • alpha: the anomalous exponent.

Important: in this class we are defining the anomalous exponent as the one calculated throught a ensemble averaged mean squared displacement over many trajectories.

  • Output:
    • trajectory: numpy.array of size 1x(d.T), where d is the number of dimensions.

Other outputs via optional inputs can be added at your discretion.

  • Other constrains:
    • The trajectories must represent the position of a particle at regular times. If your model is constructed with irregular sampling, you can use the function regularize(x,t,T) placed in utils.py , where x is an array of the positions at sampling times contained in the array t. The output of such function is a numpy array of length T.
    • All the trajectories must start at 0.
    • Add your model to the subclass corresponding to the dimensions of your model. Add it after the last model of the subclass.
    • If you contribute with a model, insert its name in the list of models presented above and in the initial comment of the file diffusion_models.py.

andi_datasets's People

Contributors

gorkamunoz avatar

Stargazers

 avatar

Watchers

 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.