hmm 0.2.1 → 0.2.1.1
raw patch · 3 files changed
+39/−21 lines, 3 filesdep +arraydep +basedep +data-memocombinators
Dependencies added: array, base, data-memocombinators, list-extras, logfloat
Files
- Data/HMM.hs +4/−19
- LICENSE +30/−0
- hmm.cabal +5/−2
Data/HMM.hs view
@@ -20,20 +20,20 @@ import Data.List.Extras import Data.Number.LogFloat import qualified Data.MemoCombinators as Memo-import Control.Parallel+-- import Control.Parallel import System.IO-import Text.ParserCombinators.Parsec+-- import Text.ParserCombinators.Parsec type Prob = LogFloat --- | The data types for our HMM. FIXME: This should probably be changed to be HMMArray+-- | The data types for our HMM. data HMM stateType eventType = HMM { states :: [stateType] , events :: [eventType] , initProbs :: (stateType -> Prob) , transMatrix :: (stateType -> stateType -> Prob) , outMatrix :: (stateType -> eventType -> Prob)- }+ } -- FIXME: This should probably be changed to be HMMArray -- deriving (Show, Read) instance (Show stateType, Show eventType) => Show (HMM stateType eventType) where@@ -385,18 +385,3 @@ Just x -> x+1 --------------hmmParse :: {-(Read stateType, Read eventType) =>-} String -> Either ParseError (HMM String Char)-hmmParse str = do- parse hmmParser str str--hmmParser :: (Read stateType, Read eventType) => GenParser Char st (HMM stateType eventType)-hmmParser = do- let hmm = HMM { states = []- , events = []- , initProbs = (\x -> 0)- , transMatrix = (\x -> \y -> 0)- , outMatrix = (\x -> \y -> 0)- }- return hmm-
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) Michael Izbicki++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.++3. Neither the name of the author nor the names of his contributors+ may be used to endorse or promote products derived from this software+ without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+POSSIBILITY OF SUCH DAMAGE.
hmm.cabal view
@@ -1,15 +1,18 @@ Name:hmm-Version:0.2.1+Version:0.2.1.1 Cabal-Version: >= 1.2 Build-type: Simple License:BSD3+License-file:LICENSE Author:Mike Izbicki Maintainer:mike@izbicki.me Homepage:https://github.com/mikeizbicki/hmm Category:Algorithms, Data mining, Machine learning+ Synopsis:A hidden markov model library+Description: Data.HMM is a library for using Hidden Markov Models with Haskell. Commonly used algoriths (i.e. the forward and backwards algorithms, Viterbi, and Baum-Welch) are implemented. The best way to learn to use it is to visit the tutorial at http:\/\/izbicki.me\/blog\/using-hmms-in-haskell-for-bioinformatics. The tutorial also includes performance benchmarks that you should be aware of. Library- -- Build-Depends:logfloat+ Build-Depends:base >=4 && < 5,logfloat,data-memocombinators,list-extras,array Exposed-modules: Data.HMM