High-order functions for models of missing data

home1 home2
 Bib
 Algorithms
 Bioinfo
 FP
 Logic
 MML
 Prog.Lang
and the
 Book

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.

Coding Ockham's Razor, L. Allison, Springer

A Practical Introduction to Denotational Semantics, L. Allison, CUP

Linux
 Ubuntu
free op. sys.
OpenOffice
free office suite
The GIMP
~ free photoshop
Firefox
web browser

© 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 Friday, 29-Mar-2024 08:03:06 AEDT.