Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
type family Emission distr Source #
Instances
type Emission (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
type Emission (Discrete symbol sh prob) Source # | |
Defined in Math.HiddenMarkovModel.Distribution |
type family Probability distr Source #
Instances
type Probability (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
type Probability (Discrete symbol sh prob) Source # | |
Defined in Math.HiddenMarkovModel.Distribution |
type family StateShape distr Source #
Instances
type StateShape (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
type StateShape (Discrete symbol sh prob) Source # | |
Defined in Math.HiddenMarkovModel.Distribution |
class Real (Probability distr) => Info distr where Source #
statesShape :: distr -> StateShape distr Source #
Instances
(Indexed stateSh, Eq stateSh, Real a) => Info (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution statesShape :: Gaussian emiSh stateSh a -> StateShape (Gaussian emiSh stateSh a) Source # | |
(C sh, Real prob, Ord symbol) => Info (Discrete symbol sh prob) Source # | |
Defined in Math.HiddenMarkovModel.Distribution statesShape :: Discrete symbol sh prob -> StateShape (Discrete symbol sh prob) Source # |
class Real (Probability distr) => Generate distr where Source #
generate :: (RandomGen g, Emission distr ~ emission, StateShape distr ~ sh) => distr -> Index sh -> State g emission Source #
class (Indexed (StateShape distr), Real (Probability distr)) => EmissionProb distr where Source #
emissionProb :: distr -> Emission distr -> Vector (StateShape distr) (Probability distr) Source #
emissionStateProb :: distr -> Emission distr -> Index (StateShape distr) -> Probability distr Source #
Instances
class (Distribution tdistr ~ distr, Trained distr ~ tdistr, EmissionProb distr) => Estimate tdistr distr where Source #
accumulateEmissions :: (Probability distr ~ prob, StateShape distr ~ sh) => Array sh [(Emission distr, prob)] -> tdistr Source #
Instances
(C emiSh, Eq emiSh, Indexed stateSh, Eq stateSh, Real a) => Estimate (GaussianTrained emiSh stateSh a) (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution type Distribution (GaussianTrained emiSh stateSh a) :: Type Source # accumulateEmissions :: (Probability (Gaussian emiSh stateSh a) ~ prob, StateShape (Gaussian emiSh stateSh a) ~ sh) => Array sh [(Emission (Gaussian emiSh stateSh a), prob)] -> GaussianTrained emiSh stateSh a Source # combine :: GaussianTrained emiSh stateSh a -> GaussianTrained emiSh stateSh a -> GaussianTrained emiSh stateSh a Source # normalize :: GaussianTrained emiSh stateSh a -> Gaussian emiSh stateSh a Source # | |
(Indexed sh, Eq sh, Real prob, Ord symbol) => Estimate (DiscreteTrained symbol sh prob) (Discrete symbol sh prob) Source # | |
Defined in Math.HiddenMarkovModel.Distribution type Distribution (DiscreteTrained symbol sh prob) :: Type Source # accumulateEmissions :: (Probability (Discrete symbol sh prob) ~ prob0, StateShape (Discrete symbol sh prob) ~ sh0) => Array sh0 [(Emission (Discrete symbol sh prob), prob0)] -> DiscreteTrained symbol sh prob Source # combine :: DiscreteTrained symbol sh prob -> DiscreteTrained symbol sh prob -> DiscreteTrained symbol sh prob Source # normalize :: DiscreteTrained symbol sh prob -> Discrete symbol sh prob Source # |
newtype Discrete symbol sh prob Source #
Instances
newtype DiscreteTrained symbol sh prob Source #
DiscreteTrained (Map symbol (Vector sh prob)) |
Instances
newtype Gaussian emiSh stateSh a Source #
Instances
(C stateSh, C emiSh, Storable a, Show stateSh, Show emiSh, Show a) => Show (Gaussian emiSh stateSh a) Source # | |
(NFData emiSh, NFData stateSh, C stateSh, NFData a, Storable a) => NFData (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
(FormatArray emiSh, C stateSh, Real a) => Format (Gaussian emiSh stateSh a) Source # | |
(emiSh ~ ZeroInt, Indexed stateSh, Real a, Eq a, Show a, Read a) => FromCSV (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution parseCells :: StateShape (Gaussian emiSh stateSh a) -> CSVParser (Gaussian emiSh stateSh a) Source # | |
(Indexed emiSh, Indexed stateSh, Real a, Eq a, Show a, Read a) => ToCSV (Gaussian emiSh stateSh a) Source # | |
(C emiSh, Eq emiSh, Indexed stateSh, Eq stateSh, Real a) => EmissionProb (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution emissionProb :: Gaussian emiSh stateSh a -> Emission (Gaussian emiSh stateSh a) -> Vector (StateShape (Gaussian emiSh stateSh a)) (Probability (Gaussian emiSh stateSh a)) Source # emissionStateProb :: Gaussian emiSh stateSh a -> Emission (Gaussian emiSh stateSh a) -> Index (StateShape (Gaussian emiSh stateSh a)) -> Probability (Gaussian emiSh stateSh a) Source # | |
(C emiSh, Eq emiSh, Indexed stateSh, Eq stateSh, Real a) => Generate (Gaussian emiSh stateSh a) Source # | |
(Indexed stateSh, Eq stateSh, Real a) => Info (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution statesShape :: Gaussian emiSh stateSh a -> StateShape (Gaussian emiSh stateSh a) Source # | |
(C emiSh, Eq emiSh, Indexed stateSh, Eq stateSh, Real a) => Estimate (GaussianTrained emiSh stateSh a) (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution type Distribution (GaussianTrained emiSh stateSh a) :: Type Source # accumulateEmissions :: (Probability (Gaussian emiSh stateSh a) ~ prob, StateShape (Gaussian emiSh stateSh a) ~ sh) => Array sh [(Emission (Gaussian emiSh stateSh a), prob)] -> GaussianTrained emiSh stateSh a Source # combine :: GaussianTrained emiSh stateSh a -> GaussianTrained emiSh stateSh a -> GaussianTrained emiSh stateSh a Source # normalize :: GaussianTrained emiSh stateSh a -> Gaussian emiSh stateSh a Source # | |
type Trained (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
type StateShape (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
type Emission (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
type Probability (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution |
newtype GaussianTrained emiSh stateSh a Source #
GaussianTrained (Array stateSh (Maybe (Vector emiSh a, HermitianMatrix emiSh a, a))) |
Instances
gaussian :: (C emiSh, C stateSh, Real prob) => Array stateSh (Vector emiSh prob, HermitianMatrix emiSh prob) -> Gaussian emiSh stateSh prob Source #
class FromCSV distr where Source #
parseCells :: StateShape distr -> CSVParser distr Source #
Instances
(emiSh ~ ZeroInt, Indexed stateSh, Real a, Eq a, Show a, Read a) => FromCSV (Gaussian emiSh stateSh a) Source # | |
Defined in Math.HiddenMarkovModel.Distribution parseCells :: StateShape (Gaussian emiSh stateSh a) -> CSVParser (Gaussian emiSh stateSh a) Source # | |
(C sh, Real prob, Show prob, Read prob, CSVSymbol symbol) => FromCSV (Discrete symbol sh prob) Source # | |
Defined in Math.HiddenMarkovModel.Distribution parseCells :: StateShape (Discrete symbol sh prob) -> CSVParser (Discrete symbol sh prob) Source # |
class Ord symbol => CSVSymbol symbol where Source #
cellFromSymbol :: symbol -> String Source #
symbolFromCell :: String -> Maybe symbol Source #
Instances
CSVSymbol Char Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
CSVSymbol Int Source # | |
Defined in Math.HiddenMarkovModel.Distribution | |
CSVSymbol Color Source # | Using |