hbayes-0.4.1: Inference with Discrete Bayesian Networks

Safe HaskellSafe-Infered

Bayes.Factor.CPT

Contents

Description

Conditional probability table

Conditional Probability Tables and Probability tables

Synopsis

CPT Factor

type CPT = PrivateCPT Vector DoubleSource

changeVariableOrderSource

Arguments

:: DVSet s

Old order

-> DVSet s'

New order

-> [Double]

Old values

-> [Double]

New values

Soft evidence factor can be used to initialize a factor instance Distribution CPT where createFactor dvs f = factorWithVariables dvs (factorToList f)

Tests

testScale_prop :: Double -> CPT -> BoolSource

Test product followed by a projection when the factors have no common variables

debugCPT :: (Show (t a), Show a) => PrivateCPT t a -> IO ()Source