Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
Synopsis
- data Evidence
- getIndex :: Node a -> Evidence -> Maybe Int
- set :: Node a -> Int -> Evidence -> Evidence
- setN :: [Node a] -> [Int] -> Evidence -> Evidence
- setId :: String -> Int -> Evidence -> Evidence
- clear :: Node a -> Evidence -> Evidence
- virtual :: Node a -> [Probability] -> Evidence
- addVirtualNodes :: Evidence -> Network () -> Network ()
- fromEvidenceTp :: Evidence -> [(String, EvidenceType)]
- data EvidenceType
- = Index Int
- | Virtual [(String, Probability)]
- virtualId :: String -> [(String, Probability)] -> Evidence
- filterEvidence :: (String -> Bool) -> Evidence -> Evidence
- evidenceMap :: Evidence -> Map String EvidenceType
- evStates :: Evidence -> [(String, Double)]
- hardEvidence :: Evidence -> [(String, Int)]
- (.==) :: Eq a => Node a -> a -> Evidence
- (.=~) :: Eq a => Node a -> [Probability] -> Evidence
- newEvidence :: String -> Probabilities -> Evidence
- evidenceIndex :: String -> Int -> Evidence
- fromEvidence :: Evidence -> [(String, Either Int Probabilities)]
- allProbabilities :: Evidence -> [(String, String, Rational)]
- evidenceOfAbsence :: Eq a => Node a -> a -> Evidence -> Evidence
- nodeNotSet :: Node a -> Evidence -> Bool
- nodeIsSet :: Node a -> Evidence -> Bool
- nodeSetTo :: Eq a => Node a -> a -> Evidence -> Bool
- noVirtuals :: Evidence -> Evidence
- isEmpty :: Evidence -> Bool
- getNames :: Evidence -> [String]
- data Probabilities
- fromProbabilities :: Probabilities -> [(String, Rational)]
- makeProbabilities :: [(String, Rational)] -> Probabilities
- findProbability :: Probabilities -> String -> Maybe Rational
- probabilitiesFor :: Evidence -> String -> Maybe [(String, Probability)]
- renameEvidence :: (String -> String) -> Evidence -> Evidence
Documentation
Evidence is associated to some node in a network by a string. It carries either an index of the state that we say we have evidence for (hard evidence) or a probability for each state of the node (virtual evidence)
Instances
Eq Evidence Source # | |
Ord Evidence Source # | |
Defined in Bayes.Evidence | |
Read Evidence Source # | |
Show Evidence Source # | |
Semigroup Evidence Source # | |
Monoid Evidence Source # | |
ToXML Evidence Source # | |
InXML Evidence Source # | |
Convertible SqlValue Evidence Source # | |
Defined in Database.Data | |
Convertible Evidence SqlValue Source # | |
Defined in Database.Data |
fromEvidenceTp :: Evidence -> [(String, EvidenceType)] Source #
data EvidenceType Source #
Index Int | |
Virtual [(String, Probability)] |
Instances
Eq EvidenceType Source # | |
Defined in Bayes.Evidence (==) :: EvidenceType -> EvidenceType -> Bool # (/=) :: EvidenceType -> EvidenceType -> Bool # | |
Ord EvidenceType Source # | |
Defined in Bayes.Evidence compare :: EvidenceType -> EvidenceType -> Ordering # (<) :: EvidenceType -> EvidenceType -> Bool # (<=) :: EvidenceType -> EvidenceType -> Bool # (>) :: EvidenceType -> EvidenceType -> Bool # (>=) :: EvidenceType -> EvidenceType -> Bool # max :: EvidenceType -> EvidenceType -> EvidenceType # min :: EvidenceType -> EvidenceType -> EvidenceType # | |
Show EvidenceType Source # | |
Defined in Bayes.Evidence showsPrec :: Int -> EvidenceType -> ShowS # show :: EvidenceType -> String # showList :: [EvidenceType] -> ShowS # |
evidenceMap :: Evidence -> Map String EvidenceType Source #
Evidence
newEvidence :: String -> Probabilities -> Evidence Source #
Evidence is associated to some node in a network by a string It carries either an index of the state that we say we have evidence of or a probability for each state of the node
fromEvidence :: Evidence -> [(String, Either Int Probabilities)] Source #
evidenceOfAbsence :: Eq a => Node a -> a -> Evidence -> Evidence Source #
Set a particular node to a default value if it is absent.
nodeNotSet :: Node a -> Evidence -> Bool Source #
Return true if a node has no state in the given evidence.
nodeSetTo :: Eq a => Node a -> a -> Evidence -> Bool Source #
Query whether a node is in a certain hard state in the evidence.
noVirtuals :: Evidence -> Evidence Source #
Probabilities
data Probabilities Source #
Instances
Show Probabilities Source # | |
Defined in Bayes.Evidence showsPrec :: Int -> Probabilities -> ShowS # show :: Probabilities -> String # showList :: [Probabilities] -> ShowS # |
fromProbabilities :: Probabilities -> [(String, Rational)] Source #
makeProbabilities :: [(String, Rational)] -> Probabilities Source #
findProbability :: Probabilities -> String -> Maybe Rational Source #
probabilitiesFor :: Evidence -> String -> Maybe [(String, Probability)] Source #
Obtain the probabilities for soft evidence at a particular node.