Introduction to Model-Based Machine Learning

39
Introduction Case Study Probabilistic Programming Conclusion Introduction to Model-Based Machine Learning Daniel Emaasit 1 1 Ph.D. Student Department of Civil and Environmental Engineering University of Nevada Las Vegas Las Vegas, NV USA [email protected] July 20 2016 1 / 39

Transcript of Introduction to Model-Based Machine Learning

Introduction Case Study Probabilistic Programming Conclusion

Introduction to Model-Based MachineLearning

Daniel Emaasit1

1Ph.D. StudentDepartment of Civil and Environmental Engineering

University of Nevada Las VegasLas Vegas, NV USA

[email protected]

July 20 2016

1 / 39

Introduction Case Study Probabilistic Programming Conclusion

Introduction

2 / 39

Introduction Case Study Probabilistic Programming Conclusion

3 / 39

Introduction Case Study Probabilistic Programming Conclusion

Current Challenges in Adopting Machine Learning

I Generally, current challenges in adopting ML:I Overwhelming number of traditional ML methods to learnI Deciding which algorithm to use or whyI Some custom problems may not fit with any existing

algorithm

4 / 39

Introduction Case Study Probabilistic Programming Conclusion

What is Model-Based Machine Learning?

I A different viewpoint for machine learning proposed byBishop (2013)1, Winn et al. (2015)2

I Goal:I Provide a single development framework which supports the

creation of a wide range of bespoke models

I The core idea:I all assumptions about the problem domain are made

explicit in the form of a model

1Bishop, C. M. (2013). Model-Based Machine Learning. PhilosophicalTransactions of the Royal Society A, 371, pp 1–17

2Winn, J., Bishop, C. M., Diethe, T. (2015). Model-Based MachineLearning. Microsoft Research Cambridge. http://www.mbmlbook.com.

5 / 39

Introduction Case Study Probabilistic Programming Conclusion

What is a Model in MBML?

I A Model:I is a set of assumptions, expressed in mathematical/graphical

formI expresses all parameters, variables as random variablesI shows the dependency between variables

6 / 39

Introduction Case Study Probabilistic Programming Conclusion

Key Ideas of MBML?

I MBML is built upon 3 key ideasI the use of Probabilistic Graphical Models (PGM)I the adoption of Bayesian MLI the application of fast, approximate inference algorithms

7 / 39

Introduction Case Study Probabilistic Programming Conclusion

Key Idea 1: Probabilistic Graphical Models

I Combine probability theory with graphs (e.g Factor Graphs)

8 / 39

Introduction Case Study Probabilistic Programming Conclusion

Key Idea 2: Bayesian Machine Learning

I Everything follows from two simple rules of probabilitytheory

9 / 39

Introduction Case Study Probabilistic Programming Conclusion

Key Idea 3: Inference Algorithms

I the application of fast, deterministic inference algorithms bylocal message passing

I Variational BayesI Expectation Propagation

10 / 39

Introduction Case Study Probabilistic Programming Conclusion

Stages of MBML

I 3 stages of MBMLI Build the model: Joint probability distribution of all the

relevant variables (e.g as a graph)I Incorporate the observed dataI Perform inference to learn parameters of the latent

variables

11 / 39

Introduction Case Study Probabilistic Programming Conclusion

Special cases of MBML

12 / 39

Introduction Case Study Probabilistic Programming Conclusion

Benefits of MBML

I Potential benefits of this approachI Provides a systematic process of creating ML solutionsI Allows for incorporation of prior knowledgeI Allows for handling uncertainity in a principled mannerI Does not suffer from overfittingI Custom solutions are built for specific problemsI Allows for quick building of several alternative modelsI Easy to compare those alternativesI It’s general purpose: No need to learn the 1000s of existing

ML algorithmsI Separates model from inference/training code

13 / 39

Introduction Case Study Probabilistic Programming Conclusion

Case Study

14 / 39

Introduction Case Study Probabilistic Programming Conclusion

TrueSkillTM by Microsoft

I Objective: Determine the true skill of millions of playerson Xbox Live

I Why: So that players of the same skill can be matched witheach other

15 / 39

Introduction Case Study Probabilistic Programming Conclusion

Stage 1: Build the Model

16 / 39

Introduction Case Study Probabilistic Programming Conclusion

Stage 2: Incorporate Observed data

17 / 39

Introduction Case Study Probabilistic Programming Conclusion

Stage 3: Learn the parameters

18 / 39

Introduction Case Study Probabilistic Programming Conclusion

Convergence

19 / 39

Introduction Case Study Probabilistic Programming Conclusion

Multiple players - Model

20 / 39

Introduction Case Study Probabilistic Programming Conclusion

Team players - Model

21 / 39

Introduction Case Study Probabilistic Programming Conclusion

Skill through time - Model

22 / 39

Introduction Case Study Probabilistic Programming Conclusion

Probabilistic Programming

23 / 39

Introduction Case Study Probabilistic Programming Conclusion

What is Probabilistic Programming?

I A software package that takes the model and thenautomatically generate inference routines (even source code!)to solve a wide variety of models

I Takes programming languages and adds support for:I random variablesI constraints on variablesI inference

I Examples of PP software packagesI Infer.Net (C#, C++)I Stan (R, python, C++)I BUGSI churchI PyMC (python)

24 / 39

Introduction Case Study Probabilistic Programming Conclusion

How Probabilistic Programming works

I How infer.NET works

25 / 39

Introduction Case Study Probabilistic Programming Conclusion

Conclusion

26 / 39

Introduction Case Study Probabilistic Programming Conclusion

Closing Remarks

I Objective of webinar:I Introduce the basics of model-based machine learning,I Introduce probabilistic programming.

I Moving forward: Now you can look into specialized topicslike:

I Fast Bayesian inference techniques,I Model building,

27 / 39

Introduction Case Study Probabilistic Programming Conclusion

References

1. J. Winn, C. Bishop, and T. Diethe, Model-Based MachineLearning,Microsoft Research,2015.

2. C. M. Bishop, “Model-based machine learning” Phil Trans RSoc, A 371: 20120222, Jan. 2013

3. T. Minka, J. Winn, J. Guiver, and D. Knowles, Infer.NET,Microsoft Research Cambridge,2010.

4. Stan Development Team, “Stan Modeling Language UsersGuide and Reference Manual,” Version 2.9.0, 2016.

5. Stan Development Team, “RStan: the R interface to Stan,”Version 2.9.0”.

6. D. Emaasit, A. Paz, and J. Salzwedel (2016). “AModel-Based Machine Learning Approach for CapturingActivity-Based Mobility Patterns using Cellular Data”.IEEE ITSC 2016. Under Review.

28 / 39

Introduction Case Study Probabilistic Programming Conclusion

Contact Me

I [email protected] github.com/EmaasitI www.danielemaasit.comI [@Emaasit](https://twitter.com/Emaasit)

29 / 39

Introduction Case Study Probabilistic Programming Conclusion

Two players - Model

30 / 39

Introduction Case Study Probabilistic Programming Conclusion

Two players - Code

31 / 39

Introduction Case Study Probabilistic Programming Conclusion

Multiple players - Model

32 / 39

Introduction Case Study Probabilistic Programming Conclusion

Multiple players - Code

33 / 39

Introduction Case Study Probabilistic Programming Conclusion

Team players - Model

34 / 39

Introduction Case Study Probabilistic Programming Conclusion

Team players - Code

35 / 39

Introduction Case Study Probabilistic Programming Conclusion

Skill through time - Model

36 / 39

Introduction Case Study Probabilistic Programming Conclusion

Skill through time - Code

37 / 39

Introduction Case Study Probabilistic Programming Conclusion

y

w x

τ

N

M

y

N

dot

w x

µw αw µx αx

τ

ατ βτ

N N

G

N

M

Figure 1: PCA model as a Bayesian network and a directed factorgraph.

38 / 39

Introduction Case Study Probabilistic Programming Conclusion

X

T

θ

αθ

Multi

Multi

Dir

φ

αφ

Dir

∀1 ≤ i ≤ nd

∀d ∈ D

∀t ∈ T

Figure 2: Latent Dirichlet allocation as directed factor graph.

39 / 39