Chapter 2. A quick Figaro tutorial

 

This chapter covers

  • Creating models, asserting evidence, running inference, and answering queries
  • Understanding the basic building blocks of models
  • Building complex models out of these building blocks

Now that you’ve seen what probabilistic programming is all about, you’re ready to get up to speed in Figaro so that you can write your own simple programs and answer queries with them. My goal in this chapter is to introduce you to the most important concepts in Figaro as quickly as possible. Future chapters provide detailed explanations of what the models mean and how they should be understood. So let’s go.

2.1. Introducing Figaro

To start, let’s take a high-level look at Figaro. Figaro, introduced in chapter 1, is a probabilistic reasoning system. Before you look at its components, let’s review the components of a probabilistic reasoning system in general so you can see how Figaro compares. Figure 2.1 reproduces the gist of the probabilistic reasoning system in chapter 1. As a reminder, general knowledge about a situation is encoded in the probabilistic model, while evidence provides specific information about a particular situation. An inference algorithm uses the model and the evidence to answer queries about your situation.

Figure 2.1. Review of probabilistic reasoning essentials

2.2. Creating models and running inference: Hello World revisited

2.3. Working with basic building blocks: atomic elements

2.4. Combining atomic elements by using compound elements

2.5. Building more-complex models with Apply and Chain

2.6. Specifying evidence by using conditions and constraints

2.7. Summary

2.8. Exercises

sitemap