Git Product home page Git Product logo

pflp-ml's Introduction

CI

pflp-ml

An embedded DSL for probabilistic programming in OCaml, based on

  1. PFLP by Dylus, Christiansen and Teegen
  2. kanren

Installation

You will need opam, OCaml and dune .

The code can be obtained with:

git clone --recursive https://github.com/arsalanc-v2/pflp-ml.git

Tests

The tests (examples) in ./examples can be run with:

cd pflp-ml
dune runtest

Interface

exception PflpFailure of Base.string
val failwith : Base.string -> 'a

type probability = Base.float
val prob : Base.float -> Mk.Micro.term

val dist :
  Mk.Micro.term ->
  Base.float ->
  Mk.Micro.substitution * Mk.Micro.var -> Mk.Micro.state Mk.Micro.stream

val dist_to_probability : Mk.Micro.term -> Base.float

val dist_to_event : Mk.Micro.term -> Mk.Micro.term

val certainly :
  Mk.Micro.term ->
  Mk.Micro.substitution * Mk.Micro.var -> Mk.Micro.state Mk.Micro.stream

val ( $ ) :
  ('a -> 'b Mk.Micro.stream) ->
  ('a -> 'b Mk.Micro.stream) -> 'a -> 'b Mk.Micro.stream

val member :
  (Mk.Micro.state -> 'a Mk.Micro.stream) Base.List.t ->
  Mk.Micro.state -> 'a Mk.Micro.stream

val enum :
  Mk.Micro.term Base.List.t ->
  Base.float Base.List.t -> Mk.Micro.state -> Mk.Micro.state Mk.Micro.stream

val uniform :
  Mk.Micro.term Base.List.t ->
  Mk.Micro.state -> Mk.Micro.state Mk.Micro.stream

val ( >>>= ) :
  ('a -> (('b, Mk.Micro.term, 'c) Base.Map.t * 'd) Mk.Micro.stream) ->
  (Mk.Micro.term -> Mk.Micro.state -> Mk.Micro.state Mk.Micro.stream) ->
  'a -> Mk.Micro.state Mk.Micro.stream

val join_with :
  (Mk.Micro.term -> Mk.Micro.term -> Mk.Micro.term) ->
  ('a -> (('b, Mk.Micro.term, 'c) Base.Map.t * 'd) Mk.Micro.stream) ->
  (Mk.Micro.state ->
   (('e, Mk.Micro.term, 'f) Base.Map.t * 'g) Mk.Micro.stream) ->
  'a -> Mk.Micro.state Mk.Micro.stream

val filter_dist :
  (Mk.Micro.term -> bool) ->
  ('a -> (('b, Mk.Micro.term, 'c) Base.Map.t * 'd) Mk.Micro.stream) ->
  'a -> Mk.Micro.state Mk.Micro.stream

val ( $$ ) :
  (Mk.Micro.term -> bool) ->
  ('a -> (('b, Mk.Micro.term, 'c) Base.Map.t * 'd) Mk.Micro.stream) ->
  'a -> Base__Float.t

References

pflp-ml's People

Contributors

arsalan0c avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.