mikeizbicki / hmm Goto Github PK
View Code? Open in Web Editor NEWhidden markov models in haskell
License: Other
hidden markov models in haskell
License: Other
Hello,
let be these functions:
smm = simpleMM ("ABCD" :: String) 2
smmBW = baumWelch smm (listToArray ("ABCDABCDABCDABCD" :: [Char])) 100
viterbi' hmm d = viterbi hmm (listToArray d)
listToArray d = listArray (1, fromIntegral $ length d) d
Some Tests:
(viterbi' smmBW "A") == ["B"]
True
(viterbi' smmBW "B") == ["C"]
False
(viterbi' smmBW "C") == ["D"]
False
(viterbi' smmBW "D") == ["A"]
False
I think, there is something I do not understand.
May you indicate me where is my mistake please ?
I found you library while searching for code that would calculate the entropy of a hidden Markov model for me. The library does not provide it directly, it seems, but I was wondering if this is something you’d plan to add?
Given the states:
["AT","NP","NN","JJ","VBD","NR","IN"]
And the events:
["The","Fulton","County","Grand","Jury","said","Friday","an","investigation","of"]
Training a simpleHMM with baumWelch on the same list of events,result in
Data.Number.LogFloat.(/): argument out of range
I think that problem was reported first at http://izbicki.me/blog/using-hmms-in-haskell-for-bioinformatics#comment-798 , is there a more recent library to use for hidden markov models? I don't mind having a go at trying to fix this, but some guidance would be appreciated!
Thanks!
See http://hydra.cryp.to/build/574131/log/raw for a complete build log.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.