High-order functions for models of missing data

LA home
Computing
 Algorithms
 Bioinformatics
 FP,  λ
 Logic,  π
 MML
 Prog.Langs

FP
 II
  Ver'1.1

estModelMaybe is a high-order function which turns an estimator for a model over a dataspace, t, into an estimator for a corresponding "model-maybe" over the dataspace Maybe t, i.e. where a datum may or may not be missing.

There are at least two options for modelling missing-ness: If missing-ness is non-informative and not to be inferred, a fixed distribution, "50:50" say, can be used to "model" it. If missing-ness is to be estimated, use the option   m1 = estMultiState (map present dataSet).

estModelMaybe :: ([t]->ModelType t) -> [Maybe t] -> ModelType (Maybe t)

estModelMaybe estModel dataSet =
 let present (Just _) = True
     present Nothing  = False
     -- m1 = estMultiState (map present dataSet)  -- model missing-ness
     m1 = fiftyFifty                           -- don't est' missing-ness
     m2 = estModel (map (\(Just x) -> x) (filter present dataSet))
 in modelMaybe m1 m2
29/12/2003

modelMaybe is a "high-order" function which takes a model of Boolean (for missing-ness) and a model over data-space, t, and produces the corresponding model over the dataspace Maybe t. (NB. "quotes" in this case because models are made of functions, rather than literally being functions, whereas estimators are functions.)

modelMaybe :: (ModelType Bool) -> (ModelType t) -> ModelType (Maybe t)

modelMaybe m1 m2 =   -- Model of Bool -> Model of T -> Model of Maybe T
 let negLogPr (Just x) = (nlPr m1 True) + (nlPr m2 x)  -- present
     negLogPr Nothing  =  nlPr m1 False                -- missing
 in MnlPr (msg1 m1 + msg1 m2)
          negLogPr
          (\() -> "(Maybe " ++ showsPrec 0 m1 ("," ++ show m2 ++ ")"))
29/12/2003

See the mixed Bayesian network case-study for an example of the use of models for missing data.

The types of estModelMaybe and modelMaybe can be generalised somewhat, but this will do for a start.

window on the wide world:

Computer Science Education Week

Linux
 Ubuntu
free op. sys.
OpenOffice
free office suite,
ver 3.4+

The GIMP
~ free photoshop
Firefox
web browser
FlashBlock
like it says!

© L. Allison   http://www.allisons.org/ll/   (or as otherwise indicated),
Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University,
was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.)
Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Monday, 21-Apr-2014 04:24:35 EST.