logo资料库

Building Probabilistic Graphical Models with Python.pdf

第1页 / 共173页
第2页 / 共173页
第3页 / 共173页
第4页 / 共173页
第5页 / 共173页
第6页 / 共173页
第7页 / 共173页
第8页 / 共173页
资料共173页,剩余部分请下载后查看
Cover
Copyright
Credits
About the Author
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Probability
The theory of probability
Goals of probabilistic inference
Conditional probability
The chain rule
The Bayes rule
Interpretations of probability
Random variables
Marginal distribution
Joint distribution
Independence
Conditional independence
Types of queries
Probability queries
MAP queries
Summary
Chapter 2: Directed Graphical Models
Graph terminology
Python digression
Independence and independent parameters
The Bayes network
The chain rule
Reasoning patterns
Causal reasoning
Evidential reasoning
Inter-causal reasoning
D-separation
The D-separation example
Blocking and unblocking a V-structure
Factorization and I-maps
The Naive Bayes model
The Naïve Bayes example
Summary
Chapter 3: Undirected Graphical Models
Pairwise Markov networks
The Gibbs distribution
An induced Markov network
Factorization
Flow of influence
Active trail and separation
Structured prediction
Problem of correlated features
The CRF representation
The CRF example
The factorization-independence tango
Summary
Chapter 4: Structure Learning
The structure learning landscape
Constraint-based structure learning
Part I
Part II
Part III
Summary of constraint-based approaches
Score-based learning
The likelihood score
The Bayesian information criterion score
The Bayesian score
Summary of score-based learning
Summary
Chapter 5: Parameter Learning
The likelihood function
Parameter learning example using MLE
MLE for Bayesian networks
Bayesian parameter learning example using MLE
Data fragmentation
Effect of data fragmentation on parameter estimation
Bayesian parameter estimation
An example of Bayesian methods for parameter learning
Bayesian estimation for the Bayesian network
Example of Bayesian estimation
Summary
Chapter 6: Exact Inference Using Graphical Models
Complexity of inference
Real-world issues
Using the Variable Elimination algorithm
Marginalizing factors that are not relevant
Factor reduction to filter on evidence
Shortcomings of the brute-force approach
Using the Variable Elimination approach
Complexity of Variable Elimination
Graph perspective
Learning the induced width from the graph structure
The tree algorithm
The four stages of the junction tree algorithm
Using the junction tree algorithm for inference
Stage 1.1 – moralization
Stage 1.2 – triangulation
Stage 1.3 – building the join tree
Stage 2 – initializing potentials
Stage 3 – message passing
Summary
Chapter 7: Approximate Inference Methods
The optimization perspective
Belief propagation on general graphs
Creating a cluster graph to run LBP
Message passing in LBP
Steps in the LBP algorithm
Improving the convergence of LBP
Applying LBP to segment an image
Understanding energy-based models
Visualizing unary and pairwise factors on a 3 x 3 grid
Creating the model for image segmentation
Applications of LBP
Sampling-based methods
Forward sampling
The accept-reject sampling method
The Markov Chain Monte Carlo sampling process
The Markov property
The Markov chain
Reaching a steady state
Sampling using a Markov chain
Gibbs sampling
Steps in the Gibbs sampling procedure
An example of Gibbs sampling
Summary
Appendix: References
Index
Building Probabilistic Graphical Models with Python Solve machine learning problems using probabilistic graphical models implemented in Python with real-world applications Kiran R Karkera BIRMINGHAM - MUMBAI
Building Probabilistic Graphical Models with Python Copyright © 2014 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2014 Production reference: 1190614 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78328-900-4 www.packtpub.com Cover image by Manju Mohanadas (manju.mohanadas@gmail.com) [ FM-2 ]
Credits Project Coordinator Melita Lobo Proofreaders Maria Gould Joanna McMahon Indexers Mariammal Chettiyar Hemangini Bari Graphics Disha Haria Yuvraj Mannari Abhinash Sahu Production Coordinator Alwin Roy Cover Work Alwin Roy Author Kiran R Karkera Reviewers Mohit Goenka Shangpu Jiang Jing (Dave) Tian Xiao Xiao Commissioning Editor Kartikey Pandey Acquisition Editor Nikhil Chinnari Content Development Editor Madhuja Chaudhari Technical Editor Krishnaveni Haridas Copy Editors Alisha Aranha Roshni Banerjee Mradula Hegde [ FM-3 ]
About the Author Kiran R Karkera is a telecom engineer with a keen interest in machine learning. He has been programming professionally in Python, Java, and Clojure for more than 10 years. In his free time, he can be found attempting machine learning competitions at Kaggle and playing the flute. I would like to thank the maintainers of Libpgm and OpenGM libraries, Charles Cabot and Thorsten Beier, for their help with the code reviews. [ FM-4 ]
About the Reviewers Mohit Goenka graduated from the University of Southern California (USC) with a Master's degree in Computer Science. His thesis focused on game theory and human behavior concepts as applied in real-world security games. He also received an award for academic excellence from the Office of International Services at the University of Southern California. He has showcased his presence in various realms of computers including artificial intelligence, machine learning, path planning, multiagent systems, neural networks, computer vision, computer networks, and operating systems. During his tenure as a student, Mohit won multiple competitions cracking codes and presented his work on Detection of Untouched UFOs to a wide range of audience. Not only is he a software developer by profession, but coding is also his hobby. He spends most of his free time learning about new technology and grooming his skills. What adds a feather to Mohit's cap is his poetic skills. Some of his works are part of the University of Southern California libraries archived under the cover of the Lewis Carroll Collection. In addition to this, he has made significant contributions by volunteering to serve the community. Shangpu Jiang is doing his PhD in Computer Science at the University of Oregon. He is interested in machine learning and data mining and has been working in this area for more than six years. He received his Bachelor's and Master's degrees from China. [ FM-5 ]
Jing (Dave) Tian is now a graduate researcher and is doing his PhD in Computer Science at the University of Oregon. He is a member of the OSIRIS lab. His research direction involves system security, embedded system security, trusted computing, and static analysis for security and virtualization. He is interested in Linux kernel hacking and compilers. He also spent a year on AI and machine learning direction and taught the classes Intro to Problem Solving using Python and Operating Systems in the Computer Science department. Before that, he worked as a software developer in the Linux Control Platform (LCP) group at the Alcatel-Lucent (former Lucent Technologies) R&D department for around four years. He got his Bachelor's and Master's degrees from EE in China. Thanks to the author of this book who has done a good job for both Python and PGM; thanks to the editors of this book, who have made this book perfect and given me the opportunity to review such a nice book. Xiao Xiao is a PhD student studying Computer Science at the University of Oregon. Her research interests lie in machine learning, especially probabilistic graphical models. Her previous project was to compare two inference algorithms' performance on a graphical model (relational dependency network). [ FM-6 ]
www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? • Fully searchable across every book published by Packt • Copy and paste, print and bookmark content • On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. [ FM-7 ]
分享到:
收藏