markov-chain
Calculate the probability of the next transition state using Markov Chains.
Demo
https://lab.miguelmota.com/markov-chain
Install
npm install markov-chain
bower install markov-chain
Usage
In this example, we calculate the probability of the next state for bull, bear, and stagnant markets.
var MarkovChain = ; var markovChain = ; markovChain; // bull, bear, stagnantmarkovChain; console; // [0.15, 0.8, 0.05]console; // [0.2675, 0.6637500000000001, 0.06875]console; // [0.35750000000000004, 0.56825, 0.07425000000000001]console; // 3console; // [0.35750000000000004, 0.56825, 0.07425000000000001] console; // [0.2675, 0.6637500000000001, 0.06875]console; // 2
License
MIT