Package for sequence modeling with Andrei Markov's models
Project description
Description
Mapykob is a Python application that provides an easy way to experiment with Markov models. While built for educational purposes, it can both be used for educational or commercial purposes.PyPI hosting
State
Installation
To install mapykoB simply run the following command in a terminal window:
$ pip install mapykoB
If you would rather install from source, run the following commands in a terminal window:
$ git clone https://github.com/octoandzl/mapykoB.git $ cd mapykob $ python setup.py install
Usage
An example would be:
$ sample_data = np.array([ $ [1, 1, 1, 0, 0, 0, 0, 0], $ [0, 1, 0, 0, 0, 1, 0, 0], $ [0, 0, 0, 0, 0, 1, 0, 1], $ [0, 0, 1, 0, 1, 1, 1, 1], $ [0, 0, 0, 0, 1, 0, 1, 0], $ [0, 1, 0, 0, 1, 1, 0, 1], $ [0, 0, 0, 1, 1, 1, 0, 0]]) $ possible_observations = Counter(sample_data[i][j] for i in range(len(sample_data)) for j in range(len(sample_data[i]))) $ M = 2 $ V = len(possible_observations) $ hmm_discreet = hmm_discreet(M,sample_data,V) $ hmm_discreet.pi = np.array([0.5, 0.5]) $ hmm_discreet.A = np.array([[0.7, 0.3], [0.4, 0.6]]) $ hmm_discreet.B = np.array([[0.6, 0.4], [0.3, 0.7]]) $ hmm_discreet.compute_alpha(0) $ p = hmm_discreet.compute_p_from_alpha(0)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mapykoB-0.0.3.tar.gz
(7.0 kB
view details)
File details
Details for the file mapykoB-0.0.3.tar.gz
.
File metadata
- Download URL: mapykoB-0.0.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f59f25287371d7d15fc8378f1ad4f3407f6496c2c1810a8bdf8869b5fa90664 |
|
MD5 | 0c1442e74fa8f4401130857a0fa6979d |
|
BLAKE2b-256 | e34f557891f054a137184a106546faa1e8749c4af5a07abcd09d61d1f860b21d |