Practicable fud decomposition fud

Haskell commentary on the implementation of Tractable and Practicable Inducers/Haskell Implementation/Practicable fud decomposition fud

Sections

Practicable fud decomposition fud

Practicable fud decomposition fud tree

Practicable fud decomposition fud

The Practicable fud decomposition fud function systemsDecompFudsNullablePracticable is defined in module AlignmentPracticable. The implementation expects the model variables in the given fud decomposition to be of type VarPair (VarPair (f, _), _), e.g. <<3,2>,166>, which is the case for the practicable inducers in the Implementation. The resultant fud has an additional layer of derived nullable variables, e.g. <<3,n>,1>, which have an additional value null. If the nullable variables are in children fuds they also depend on a contingent variable, e.g. <<2,c>,1>>, which, in turn, depends on a slice variable, e.g. <<2,s>,1>, and possibly on a parent slice variable, e.g. <<1,s>,2>. Both contingent variables and slice variables have values in and out. Note that the Integer argument g allows more than one nullable layer to be added to a fud decomposition.

systemsDecompFudsNullablePracticable :: System -> DecompFud -> Integer -> Maybe Fud

systemsDecompFudsNullablePracticable uu df g 
  ...

Note that the system for the resultant fud may be obtained from fudsSystemImplied,

let fsys = fudsSystemImplied

let ff = fromJust $ systemsDecompFudsNullablePracticable uu df 1

let uu' = uu `pairSystemsUnion` (fsys ff)

An example of a fud decomposition fud is described in Analysis of the UCI Machine Learning Repository Mushroom Data Set - Induced modelling of edibility.

Practicable fud decomposition fud tree

The Practicable fud decomposition fud tree function systemsDecompFudsNullableTreePracticable is defined in module AlignmentPracticable. This method is exactly the same as the Practicable fud decomposition fud function systemsDecompFudsNullablePracticable above except that it also returns a tree of slice/contingent-nullable variable set pairs, which mirrors the decomposition tree.

systemsDecompFudsNullableTreePracticable :: System -> DecompFud -> Integer -> 
  Maybe (Fud, Tree (Set.Set Variable, Set.Set Variable))

systemsDecompFudsNullableTreePracticable uu df g 
  ...

For example,

let (ff,yy) = fromJust $ systemsDecompFudsNullableTreePracticable uu df 1

rpln $ Set.toList $ treesPaths $ funcsTreesMap (\(xx,ff) -> (xx, Set.findMin ff)) yy
"[({},<<1,n>,1>),({<<1,s>,1>},<<8,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>),({<<2,c>,1>},<<3,n>,1>),({<<3,c>,1>},<<5,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>),({<<2,c>,1>},<<3,n>,1>),({<<3,c>,2>},<<7,n>,1>),({<<7,c>,1>},<<9,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,3>},<<4,n>,1>),({<<4,c>,1>},<<6,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,4>},<<10,n>,1>)]"

rpln $ Set.toList $ treesSubPaths $ funcsTreesMap (\(xx,ff) -> (xx, Set.findMin ff)) yy
"[({},<<1,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,1>},<<8,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>),({<<2,c>,1>},<<3,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>),({<<2,c>,1>},<<3,n>,1>),({<<3,c>,1>},<<5,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>),({<<2,c>,1>},<<3,n>,1>),({<<3,c>,2>},<<7,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,2>},<<2,n>,1>),({<<2,c>,1>},<<3,n>,1>),({<<3,c>,2>},<<7,n>,1>),({<<7,c>,1>},<<9,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,3>},<<4,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,3>},<<4,n>,1>),({<<4,c>,1>},<<6,n>,1>)]"
"[({},<<1,n>,1>),({<<1,s>,4>},<<10,n>,1>)]"

top