In [1]:
%matplotlib inline

In [2]:
from kmr import KMR2x2

In [3]:
p = 1/3
N = 10
epsilon = 0.01
ts_length = 10**8

In [4]:
kmr = KMR2x2(p, N, epsilon)

In [5]:
%timeit kmr.simulate(ts_length, init=0)


1 loop, best of 3: 4.67 s per loop

In [6]:
x = kmr.simulate(ts_length, init=0)

In [7]:
kmr.plot_sample_path(x)



In [8]:
kmr.plot_empirical_dist(x)



In [9]:
kmr.plot_stationary_dist()



In [10]:
kmr.epsilon = 0.005

In [11]:
x = kmr.simulate(ts_length, init=0)

In [12]:
kmr.plot_sample_path(x)



In [13]:
kmr.plot_empirical_dist(x)



In [14]:
kmr.plot_stationary_dist()



In [15]:
import platform
print(platform.platform())

import sys
print(sys.version)

import numpy
print('NumPy:', numpy.__version__)

import numba
print('Numba:', numba.__version__)


Darwin-15.6.0-x86_64-i386-64bit
3.5.2 |Anaconda 4.1.1 (x86_64)| (default, Jul  2 2016, 17:52:12) 
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]
NumPy: 1.11.1
Numba: 0.26.0

In [ ]: