Safe Haskell | Safe-Infered |
---|
Conditional probability table
Conditional Probability Tables and Probability tables
- type CPT = PrivateCPT Vector Double
- changeVariableOrder :: DVSet s -> DVSet s' -> [Double] -> [Double]
- cptDivide :: CPT -> CPT -> CPT
- cptSum :: [CPT] -> CPT
- testProductProject_prop :: CPT -> CPT -> Property
- testAssocProduct_prop :: CPT -> CPT -> CPT -> Bool
- testScale_prop :: Double -> CPT -> Bool
- testProjectCommut_prop :: CPT -> Property
- testScalarProduct_prop :: Double -> CPT -> Bool
- testProjectionToScalar_prop :: CPT -> Bool
- debugCPT :: (Show (t a), Show a) => PrivateCPT t a -> IO ()
CPT Factor
Soft evidence factor can be used to initialize a factor instance Distribution CPT where createFactor dvs f = factorWithVariables dvs (factorToList f)
Tests
testProductProject_prop :: CPT -> CPT -> PropertySource
testScale_prop :: Double -> CPT -> BoolSource
Test product followed by a projection when the factors have no common variables
testScalarProduct_prop :: Double -> CPT -> BoolSource