GithubHelp home page GithubHelp logo

mcroute's Introduction

MCRoute

Markov chain modelling of transportation networks.

This package enables the modelling of networks (transportation or otherwise) in which movement through the network is represented by discrete state Markov chains.

MCRoute extends the NetworkX module, requiring each node and edge to have an accompanying transition probability matrix that can be used during network traversal calculations. The package also incldues utility functions for constructing transition matrices from data and theoretical distributions.

Get Started

You can take a look at the example workbooks available on GitHub.

Documentation

Documentation can be found for the latest release on Read the Docs

Citing This Package

Please cite the following paper (currently under preparation):

W. Klumpenhouwer Modelling Stochastic Transportation Networks with Markov Chains. (Under Preparation)

mcroute's People

Contributors

wklumpen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

mcroute's Issues

Creating a beta distributed probability transition matrix

Introduction

I'm going to implement a method which generates a beta distributed probability transition matrix. Putting it together create a design decision that I wanted to document.

For reference: https://en.wikipedia.org/wiki/Beta_distribution

The beta distribution has support on the interval [0,1]. It seems logical and advantageous to scale the state space values such that they are also in that unit interval, and then use the beta.cdf function from scipy to calculate the probability intervals.

There are (at least) two feasible ways of implementing scaling: Scale each row individually (option a), or scale based on the entire state space set (option b).

a) Scaling each row individually will create smooth distributions along each row, and will limit edge effects on the edges of the matrix, however it will result in each row having a distribution centered on the middle of the row, which runs contrary to the philosophy of the other matrix designs (such as the normal distribution).

b) Determining a single scale for the largest and smallest possible state transitions in the entire matrix allows for a simple single scaling calculation. It will center the distribution on the range of available transitions, however it will limit the spread of a distribution towards the edges and effectively truncate the distribution before the edges of the matrix. This will also help reduce edge effects, but it will narrow the impact of the distribution regardless of the shape.

I am going to implement option b for this release, however further discussion is warranted on other ideas.

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.