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']
]
Release files for psuffix-trees 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| psuffix_trees-1.0.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| psuffix_trees-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / psuffix_trees-1.0.0.tar.gz
| Download URL | psuffix_trees-1.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
343422aba9e3130a9d900b8fc0c1a834e34658554c792283e02d5ba305dc21e8
|
|
BLAKE2b-256 checksum How to use checksums |
71bfbf3aebce90cb12f748f4aecfea87f17bcfeb687d9eab299b9eef2d312055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.15
|
Release files / psuffix_trees-1.0.0-py3-none-any.whl
| Download URL | psuffix_trees-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01a72fa7e1fef100ddbe7721460b9a7f180d799ba1ebd53eb303dc0740066f2e
|
|
BLAKE2b-256 checksum How to use checksums |
fe6e215e30875178cc69b452f3e4e56efda172fe1ab46686f187324f9772be1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.15
|