Chapter 7. Object-oriented probabilistic modeling

 

This chapter covers

  • Using object-oriented (OO) programming techniques to organize complex probabilistic models
  • Combining OO techniques with concepts from relational databases, using objects and relationships between objects to create flexible models
  • Figaro constructs for OO modeling, including element collections and references
  • Using Figaro constructs to represent uncertainty about object types and relationships

In the previous chapter, you learned all about how collections can be used to structure probabilistic programs. This chapter continues with the theme of using common programming language constructs to build probabilistic programs. The theme of this chapter is using object-oriented programming techniques to represent probabilistic models. Object orientation is a powerful programming technique in general, and, as you’ll learn, it’s particularly appropriate for probabilistic modeling, because it’s natural to describe a situation in terms of objects in that situation and relationships between the objects. Scala is a particularly appropriate programming language as the basis for probabilistic programming, because it’s both functional and object-oriented. This is one of the main reasons Scala was chosen as the language for embedding Figaro.

7.1. Using object-oriented probabilistic models

7.2. Extending OO probability models with relations

7.3. Modeling relational and type uncertainty

7.4. Summary

7.5. Exercises