List of Listings

 

Chapter 1. Probabilistic programming in a nutshell

Listing 1.1. Hello World in Java

Listing 1.2. Hello World in Figaro

Chapter 3. Creating a probabilistic programming application

Listing 3.1. Abstract Model class

Listing 3.2. Reasoning model

Listing 3.3. LearnedParameters class

Listing 3.4. PriorParameters class

Listing 3.5. Dictionary class

Listing 3.6. Email class

Listing 3.7. The classify method

Listing 3.8. Reasoning component main method

Listing 3.9. Dictionary object

Listing 3.10. The learnMAP method

Listing 3.11. Learning component main method

Chapter 5. Modeling dependencies with Bayesian and Markov networks

Listing 5.1. Implementing the general print fault model in Figaro

Listing 5.2. Detailed printer model in Figaro

Listing 5.3. Product success prediction model in Figaro

Listing 5.4. Helper function for traversing the social network

Chapter 6. Using Scala and Figaro collections to build up models

Listing 6.1. Two-dimensional sales model

Listing 6.2. Hierarchical model using Figaro containers

Chapter 7. Object-oriented probabilistic modeling

Listing 7.1. Printer problem using object-orientation: class models

Listing 7.2. Printer problem: PrintExperience class

Listing 7.3. Printer problem: creating instances and querying the model

Listing 7.4. Printer class hierarchy