Advise-me-0.1: Assessment services for the Advise-Me project

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellNone
LanguageHaskell98

Bayes.Evidence

Contents

Description

 
Synopsis

Documentation

data 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 for (hard evidence) or a probability for each state of the node (virtual evidence)

Instances
Eq Evidence Source # 
Instance details

Defined in Bayes.Evidence

Ord Evidence Source # 
Instance details

Defined in Bayes.Evidence

Read Evidence Source # 
Instance details

Defined in Bayes.Evidence

Show Evidence Source # 
Instance details

Defined in Bayes.Evidence

Semigroup Evidence Source # 
Instance details

Defined in Bayes.Evidence

Monoid Evidence Source # 
Instance details

Defined in Bayes.Evidence

ToXML Evidence Source # 
Instance details

Defined in Bayes.Evidence

Methods

toXML :: Evidence -> XML #

listToXML :: [Evidence] -> XML #

InXML Evidence Source # 
Instance details

Defined in Bayes.Evidence

Methods

fromXML :: Monad m => XML -> m Evidence #

listFromXML :: Monad m => XML -> m [Evidence] #

Convertible SqlValue Evidence Source # 
Instance details

Defined in Database.Data

Convertible Evidence SqlValue Source # 
Instance details

Defined in Database.Data

setN :: [Node a] -> [Int] -> Evidence -> Evidence Source #

evStates :: Evidence -> [(String, Double)] Source #

Evidence is recorded as a mapping from node names to probabilities of being in a certain state. This function obtains a pairing of strings of the form "NODE#STATE" to a number from 0 to 1.

hardEvidence :: Evidence -> [(String, Int)] Source #

Obtain the states of the hard evidence.

Evidence

(.==) :: Eq a => Node a -> a -> Evidence Source #

(.=~) :: Eq a => Node a -> [Probability] -> Evidence Source #

Soft evidence counterpart to .==

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

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.

Probabilities

probabilitiesFor :: Evidence -> String -> Maybe [(String, Probability)] Source #

Obtain the probabilities for soft evidence at a particular node.