Infer.NET user guide

Introducing Infer.NET Fun

Infer.NET Fun is a domain-specific language for probabilistic modelling that is embedded in F# and compiled to Infer.NET.

The Infer.NET Fun website has additional information.

Comparison between Infer.NET Fun and the F# Wrapper API

The F# wrapper API (Infer.FSharp.dll) directly exposes the standard Infer.NET modelling API to F# programs, and in particular uses explicit types of random variables to construct models. In contrast, Infer.NET Fun (Infer.Fun.dll) allows the user to write generative models as F# expressions where random variables are implicitly represented by ordinary program variables. For inference, Infer.NET Fun compiles F# models into calls to the standard Infer.NET modelling API. Additionally, and unlike models written against the F# wrapper API, Infer.NET Fun models may be executed with the F# compiler to sample synthetic data.

Prerequisites and Limitations of Infer.NET Fun

Infer.NET Fun depends on the Infer.NET compiler and runtime. Additionally, the BayesPointMachine, LinearRegression, and TrueSkill samples rely on Excel to display charts of data. If Excel is not installed, you can comment out the calls to Excel, and inference would still work.

Infer.NET Fun is a preview component of Infer.NET, intended to meet most basic usage scenarios, but with some limitations, and with the possibility of breaking API or behaviour changes in future releases.

Models built using Infer.NET Fun have some limitations compared to models built using the core Infer.NET system.

  • Regarding completeness, neither repeat blocks nor Markov Chains are yet supported. Models with repeat blocks can be reformulated without them, but repeat blocks offer considerable performance gains.
  • Regarding performance, Infer.NET Fun inserts the switch blocks automatically, but the placement may not be optimal in terms of performance. Infer.NET Fun does not support running inference with different data without recompilation. Variable attributes (sparsity, initialise, valueRange, marginalPrototype) may be set using the interpDynamic function to retrieve model variables before inference. See file Samples\Fun\Reference.fsx for an example.

Fun Documentation Table of Contents

 

     

     

     

©2009-2013 Microsoft Corporation. All rights reserved.  Terms of Use | Trademarks | Privacy Statement