← Back to context

Comment by aphyr

15 years ago

Has anyone created a probabilistic language akin to Prolog? I feel like confidence interval propagation, with appropriate notions of covariance and error distributions, could be really useful for hypothesis testing.

I beleive what you are looking for is Fril:

http://en.wikipedia.org/wiki/Fril

It is a lisp-y prolog that supports fuzzy relations (confidence interval for predicates).

It is not bad if fuzzy logic is your cup of tea.

Here is the reference:

http://www.enm.bris.ac.uk/ai/martin/FrilManual/index.html

Code example (from reference doc of goal set (gs) predicate):

   ((test a)) : (0.5 0.8) 
   ((test b)) : (0.7 0.9) 
   qs ((test X) (test Y)) 
   ((test a) (test b)) : (0.25 0.64) 
   ((test a) (test b)) : (0.35 0.72) 
   ((test b) (test a)) : (0.35 0.72) 
   ((test b) (test b)) : (0.49 0.81) 
   no (more) solutions 
   yes

EDIT: more examples and explanation by its author, Trevor Martin from Bristol Univ.

ftp://ftp.cs.cmu.edu/user/ai/areas/fuzzy/com/fril/fril.txt

There's PRISM, which is used for analyzing probabilistic systems: http://www.prismmodelchecker.org/

  • Oh my god. I have dreamed of, and half-implemented badly, exactly this. Not quite what I was thinking of, but still quite useful for that class of problem.

    You should submit this as an HN post too. Thanks!

  • There's also TreeAge which is popular in health informatics (the name is a pun off of "triage") and, perhaps more generally, BUGS/JAGS which can be used to build and test arbitrary Bayesian network models.

Can you elaborate? Do you mean something like the probability monad?

  • Specifically, I want to express a model in analytic terms:

    x = 2y + z^2

    provide a dataset of x, y, and z tuples with associated error distributions, and ask questions like "what is three-sigma confidence interval for the model given this dataset", and "what would tunable parameters a and b have to be for the most consistent account".

    Ideally, it'd be able to take into account convolutions, as well.

    • _The Art of Prolog_'s chapter on meta-interpreters* includes an interpreter with uncertainty thresholds. It's about a quarter-page of code - It's on page 318, in the first edition (what I have on hand). Extending it to support statistical significance rather than just a 0-1.0 confidence interval shouldn't be too hard. Combining that with constraint programming would probably suffice.

      * Rather like chapter 4 of SICP, on making metacircular evaluator Prologs.