Skip to main content

crf beam search

Project description

crf-beam

Beam search for Bonito CRF models.

Usage

>>> import torch
>>> from crf_beam import beam_search
>>>
>>> T, C, S = 1000, 320, 64
>>> scores = torch.rand(T, C)
>>> back_guides = torch.rand(T + 1, S)
>>> post = torch.rand(T, S)
>>>
>>> sequence, qstring, moves = beam_search(scores, back_guides, post)
>>> sequence
'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT...'
>>> qstring
'(&''(****95444"@732"55",--/5555"5"@@E"E4""","-#**...'

Developer Quickstart

Python

$ python3 -m venv venv3
$ source venv3/bin/activate
(venv3) $ pip install -r requirements.txt
(venv3) $ make build
(venv3) $ make test

WASM

$ make wasm
$ node tests/test.js

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

crf_beam-0.1.9-cp311-cp311-manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11

crf_beam-0.1.9-cp310-cp310-manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.10

crf_beam-0.1.9-cp39-cp39-manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.9

crf_beam-0.1.9-cp38-cp38-manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8

File details

Details for the file crf_beam-0.1.9-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for crf_beam-0.1.9-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44fce62152b04099ec6b58d191d416b2cdce32f1207866b31cb6b4ce7b211e82
MD5 94689f00fe1d04fddc551edb2fac76e1
BLAKE2b-256 0696726b99dc1ce2d529ecfca03e222c1c51b73050c706879a976434c6c98fe1

See more details on using hashes here.

File details

Details for the file crf_beam-0.1.9-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for crf_beam-0.1.9-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99b1b093c86c6b1520604f5639d723c3adf1d2e5f519e3ceb882a58f9c7e34eb
MD5 5b8e5bb1e00f885b7bb67166952e95bb
BLAKE2b-256 01e521ad7726697c64fa03d35d655b3ae34eb5955fd646894023febf59802897

See more details on using hashes here.

File details

Details for the file crf_beam-0.1.9-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for crf_beam-0.1.9-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5505820db9687778d4d588b9ba4df851358b904f180170f11e3ecd157496aee5
MD5 4d03457111fc9ae94e748b96ee464e78
BLAKE2b-256 8e44382ab76e8c210065558a614586df07e5c4849fb5ba76c41bdea6d960a674

See more details on using hashes here.

File details

Details for the file crf_beam-0.1.9-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for crf_beam-0.1.9-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 643f9bd52e7fd4329119818e455162beab3e9e5a4b5fa51d796924fb85063953
MD5 d7749994f84e223760412831e4661ea5
BLAKE2b-256 79f399fc7deddf8e38f97a7468f7a6a977cc24be9a36aa100ca5b602b0e9ea1c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page