Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- applyModel :: (MonadLog (WithSeverity String) m, Probability p, Show p) => Model p Char -> [String] -> m String
- combinations :: (MonadLog (WithSeverity String) m, Show p, Probability p) => Int -> m (Vector p)
- oneWordProb :: (Show p, MonadLog (WithSeverity String) m, Probability p, Show elem, Ord elem) => Counts elem -> p -> p -> p -> p -> Int -> Morph elem -> m p
- g :: (Show p, MonadLog (WithSeverity String) m, Ord elem, Show elem, Probability p) => Counts elem -> p -> p -> p -> Morph elem -> Morph elem -> p -> Int -> Int -> m p
- distribution :: (Show p, MonadLog (WithSeverity String) m, Probability p, Show elem, Ord elem, Show p) => Counts elem -> p -> p -> p -> Morph elem -> Morph elem -> p -> Int -> m (Vector p)
- sampleSite :: (Probability p, Categorical p, Show p, MonadIO m, MonadLog (WithSeverity String) m, MonadRandom m, MonadState (SamplingState Char) m, MonadReader (Params p) m) => Set Int -> m (Set Int)
- sample :: (Probability p, Categorical p, Show p, MonadIO m, MonadRandom m, MonadReader (Params p) m, MonadState (SamplingState Char) m, MonadLog (WithSeverity String) m) => Int -> m ()
- fromState :: (MonadLog (WithSeverity String) m, Ord elem, Show elem, Probability p) => (Params p, Locations elem) -> Maybe [elem] -> m (Model p elem)
Documentation
applyModel :: (MonadLog (WithSeverity String) m, Probability p, Show p) => Model p Char -> [String] -> m String Source #
combinations :: (MonadLog (WithSeverity String) m, Show p, Probability p) => Int -> m (Vector p) Source #
oneWordProb :: (Show p, MonadLog (WithSeverity String) m, Probability p, Show elem, Ord elem) => Counts elem -> p -> p -> p -> p -> Int -> Morph elem -> m p Source #
Compute the log-probability of generating the given word n times, based on counts
g :: (Show p, MonadLog (WithSeverity String) m, Ord elem, Show elem, Probability p) => Counts elem -> p -> p -> p -> Morph elem -> Morph elem -> p -> Int -> Int -> m p Source #
Compute the log-probability of setting a single set of m sites, out of n, to positive
distribution :: (Show p, MonadLog (WithSeverity String) m, Probability p, Show elem, Ord elem, Show p) => Counts elem -> p -> p -> p -> Morph elem -> Morph elem -> p -> Int -> m (Vector p) Source #
Compute the log-categorical distribution of possible number of sites to set to positive: P(m) = (n choose m) * g(m)
sampleSite :: (Probability p, Categorical p, Show p, MonadIO m, MonadLog (WithSeverity String) m, MonadRandom m, MonadState (SamplingState Char) m, MonadReader (Params p) m) => Set Int -> m (Set Int) Source #
Randomly sample a site from those currently available, and then block-sample all compatible sites, returning the updated list of available sites
sample :: (Probability p, Categorical p, Show p, MonadIO m, MonadRandom m, MonadReader (Params p) m, MonadState (SamplingState Char) m, MonadLog (WithSeverity String) m) => Int -> m () Source #
Run one sampling iteration