A Python port of the Matlab probabilistic suffix trees and automata library by Markowitz
Project description
psuffix-trees
A Python port of the Matlab probabilistic suffix trees and automata library by Markowitz (https://github.com/jmarkow/pst)
This port is an implementation probabilistic suffix trees by Ron, Singer and Tishby 1996.
How to use
Simple Example
You'll need a dataset of sequences. There is a nice example in pypst/fixtures/output_symbols.json if you want something to play around with.
dataset = [
"VHDEFAZDEFABGNVbEFKJaSAHDHD",
"BN",
"CTCQMTJcO",
...
]
from pypst import PST
pst = PST(
L = 2,
p_min = 0.0073,
g_min = .01,
r = 1.6,
alpha = 17.5,
)
pst.fit(dataset)
pst.tree
Any sequence that is iterable is acceptable
Setup your dataset of sequences
dataset = [
"VHDEFAZDEFABGNVbEFKJaSAHDHD",
"BN",
"CTCQMTJcO",
...
]
Your dataset entries can be any sequence whether its string, list or tuple.
dataset = [
['1','2','3'],
['2','4','7','8']
['5','1','2']
]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psuffix_trees-1.0.0.tar.gz.
File metadata
- Download URL: psuffix_trees-1.0.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
343422aba9e3130a9d900b8fc0c1a834e34658554c792283e02d5ba305dc21e8
|
|
| MD5 |
c9db74ba0f50b0f3754a109b1aaceced
|
|
| BLAKE2b-256 |
71bfbf3aebce90cb12f748f4aecfea87f17bcfeb687d9eab299b9eef2d312055
|
File details
Details for the file psuffix_trees-1.0.0-py3-none-any.whl.
File metadata
- Download URL: psuffix_trees-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01a72fa7e1fef100ddbe7721460b9a7f180d799ba1ebd53eb303dc0740066f2e
|
|
| MD5 |
511a39d375bfce6aa0f80ca0c3166665
|
|
| BLAKE2b-256 |
fe6e215e30875178cc69b452f3e4e56efda172fe1ab46686f187324f9772be1c
|