Hands-On Simulation Modeling with Python: Develop simulation models to help you get accurate results and enhance the decision-making process, 2nd Edition
- Length: 468 pages
- Edition: 2
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2023-01-10
- ISBN-10: 1804616885
- ISBN-13: 9781804616888
- Sales Rank: #3527470 (See Top 100 Books)
Get to grips with constructing state of the art simulation models with python.
Key Features
- Understand various statistical and physical simulations to improve systems using Python
- Learn to create a numerical prototype of a real model using hands-on examples
- Evaluate performance and output results based on how the prototype would work in the real environment
Book Description
This book is a comprehensive guide to understand various computational statistical simulations using Python.
This book will start with the required foundation to understand various methods and techniques to delve into complex topics. Developers working with simulation models will be able to put their knowledge to work with this practical guide. The book provides a hands-on approach to implementation and associated methodologies that will have you up-and-running, and productive in no time.
Complete with step-by-step explanations of essential concepts, practical examples and self-assessment questions, you will begin by exploring the numerical simulation algorithms, including an overview of relevant applications. You’ll learn how to use Python to develop simulation model and understand how to use the several Python packages. You will then explore various numerical simulation algorithms and concepts, such as Markov Decision Process, Monte Carlo methods, and bootstrapping techniques. By the end of this book, you will be able to construct simulation models.
What you will learn
- Get to grips with the concepts of randomness and data generation process
- Delve into Resampling methods
- Learn how to work with Monte Carlo Simulations
- Use simulation to improve or optimize systems
- Learn how to run efficient simulations to analyze real-world systems
- Learn to run efficient simulations to analyze real-world systems
Who This Book Is For
This book is for Data Scientists, simulation engineers, or anyone who is already familiar with the basic computational methods but now wants to implement various simulation techniques such as Monte-Carlo methods, statistical simulation using Python.
Hands-On Simulation Modeling with Python Contributors About the author About the reviewer Preface Who this book is for What this book covers To get the most out of this book Download the example code files Conventions used Get in touch Share Your Thoughts Download a free PDF copy of this book Part 1:Getting Started with Numerical Simulation Chapter 1: Introducing Simulation Models Technical requirements Introducing simulation models Decision-making workflow Comparing modeling and simulation Pros and cons of simulation modeling Simulation modeling terminology Classifying simulation models Comparing static and dynamic models Comparing deterministic and stochastic models Comparing continuous and discrete models Approaching a simulation-based problem Problem analysis Data collection Setting up the simulation model Simulation software selection Verification of the software solution Validation of the simulation model Simulation and analysis of results Exploring Discrete Event Simulation (DES) Finite-state machine (FSM) State transition table (STT) State transition graph (STG) Dynamic systems modeling Managing workshop machinery Simple harmonic oscillator The predator-prey model How to run efficient simulations to analyze real-world systems Summary Chapter 2: Understanding Randomness and Random Numbers Technical requirements Stochastic processes Types of stochastic processes Examples of stochastic processes The Bernoulli process Random walk The Poisson process Random number simulation Probability distribution Properties of random numbers The pseudorandom number generator The pros and cons of a random number generator Random number generation algorithms Linear congruential generator Random numbers with uniform distribution Lagged Fibonacci generator Testing uniform distribution Chi-squared test Uniformity test Exploring generic methods for random distributions The inverse transform sampling method The acceptance-rejection method Random number generation using Python Introducing the random module Generating real-value distributions Randomness requirements for security Password-based authentication systems Random password generator Cryptographic random number generator Introducing cryptography Randomness and cryptography Encrypted/decrypted message generator Summary Chapter 3: Probability and Data Generation Processes Technical requirements Explaining probability concepts Types of events Calculating probability Probability definition with an example Understanding Bayes’ theorem Compound probability Bayes’ theorem Exploring probability distributions The probability density function Mean and variance Uniform distribution Binomial distribution Normal distribution Generating synthetic data Real data versus artificial data Synthetic data generation methods Data generation with Keras Data augmentation Simulation of power analysis The power of a statistical test Power analysis Summary Part 2:Simulation Modeling Algorithms and Techniques Chapter 4: Exploring Monte Carlo Simulations Technical requirements Introducing the Monte Carlo simulation Monte Carlo components First Monte Carlo application Monte Carlo applications Applying the Monte Carlo method for Pi estimation Understanding the central limit theorem Law of large numbers The central limit theorem Applying the Monte Carlo simulation Generating probability distributions Numerical optimization Project management Performing numerical integration using Monte Carlo Defining the problem Numerical solution Min-max detection The Monte Carlo method Visual representation Exploring sensitivity analysis concepts Local and global approaches Sensitivity analysis methods Sensitivity analysis in action Explaining the cross-entropy method Introducing cross-entropy Cross-entropy in Python Binary cross-entropy as a loss function Summary Chapter 5: Simulation-Based Markov Decision Processes Technical requirements Introducing agent-based models Overview of Markov processes The agent-environment interface Exploring MDPs Understanding the discounted cumulative reward Comparing exploration and exploitation concepts Introducing Markov chains Transition matrix Transition diagram Markov chain applications Introducing random walks One-dimensional random walk Simulating a 1D random walk Simulating a weather forecast Bellman equation explained Dynamic programming concepts Principle of optimality Bellman equation Multi-agent simulation Schelling’s model of segregation Python Schelling model Summary Chapter 6: Resampling Methods Technical requirements Introducing resampling methods Sampling concepts overview Reasoning about sampling Pros and cons of sampling Probability sampling How sampling works Exploring the Jackknife technique Defining the Jackknife method Estimating the coefficient of variation Applying Jackknife resampling using Python Demystifying bootstrapping Introducing bootstrapping Bootstrap definition problem Bootstrap resampling using Python Comparing Jackknife and bootstrap Applying bootstrapping regression Explaining permutation tests Performing a permutation test Approaching cross-validation techniques Validation set approach Leave-one-out cross-validation k-fold cross-validation Cross-validation using Python Summary Chapter 7: Using Simulation to Improve and Optimize Systems Technical requirements Introducing numerical optimization techniques Defining an optimization problem Explaining local optimality Exploring the gradient descent technique Defining descent methods Approaching the gradient descent algorithm Understanding the learning rate Explaining the trial and error method Implementing gradient descent in Python Understanding the Newton-Raphson method Using the Newton-Raphson algorithm for root finding Approaching Newton-Raphson for numerical optimization Applying the Newton-Raphson technique The secant method Deepening our knowledge of stochastic gradient descent Approaching the EM algorithm EM algorithm for Gaussian mixture Understanding Simulated Annealing (SA) Iterative improvement algorithms SA in action Discovering multivariate optimization methods in Python The Nelder-Mead method Powell’s conjugate direction algorithm Summarizing other optimization methodologies Summary Chapter 8: Introducing Evolutionary Systems Technical requirements Introducing SC Fuzzy logic (FL) Artificial neural network (ANN) Evolutionary computation Understanding genetic programming Introducing the genetic algorithm (GA) The basics of GA Genetic operators Applying a GA for search and optimization Performing symbolic regression (SR) Exploring the CA model Game-of-life Wolfram code for CA Summary Part 3:Simulation Applications to Solve Real-World Problems Chapter 9: Using Simulation Models for Financial Engineering Technical requirements Understanding the geometric Brownian motion model Defining a standard Brownian motion Addressing the Wiener process as random walk Implementing a standard Brownian motion Using Monte Carlo methods for stock price prediction Exploring the Amazon stock price trend Handling the stock price trend as a time series Introducing the Black-Scholes model Applying the Monte Carlo simulation Studying risk models for portfolio management Using variance as a risk measure Introducing the Value-at-Risk metric Estimating VaR for some NASDAQ assets Summary Chapter 10: Simulating Physical Phenomena Using Neural Networks Technical requirements Introducing the basics of neural networks Understanding biological neural networks Exploring ANNs Understanding feedforward neural networks Exploring neural network training Simulating airfoil self-noise using ANNs Importing data using pandas Scaling the data using sklearn Viewing the data using Matplotlib Splitting the data Explaining multiple linear regression Understanding a multilayer perceptron regressor model Approaching deep neural networks Getting familiar with convolutional neural networks Examining recurrent neural networks Analyzing long short-term memory networks Exploring GNNs Introducing graph theory Adjacency matrix GNNs Simulation modeling using neural network techniques Concrete quality prediction model Summary Chapter 11: Modeling and Simulation for Project Management Technical requirements Introducing project management Understanding what-if analysis Managing a tiny forest problem Summarizing the Markov decision process Exploring the optimization process Introducing MDPtoolbox Defining the tiny forest management example Addressing management problems using MDPtoolbox Changing the probability of a fire starting Scheduling project time using the Monte Carlo simulation Defining the scheduling grid Estimating the task’s time Developing an algorithm for project scheduling Exploring triangular distribution Summary Chapter 12: Simulating Models for Fault Diagnosis in Dynamic Systems Technical requirements Introducing fault diagnosis Understanding fault diagnosis methods The machine-learning-based approach Fault diagnosis model for a motor gearbox Fault diagnosis system for an unmanned aerial vehicle Summary Chapter 13: What’s Next? Summarizing simulation modeling concepts Generating random numbers Applying Monte Carlo methods Addressing the Markov decision process Analyzing resampling methods Exploring numerical optimization techniques Using artificial neural networks for simulation Applying simulation models to real life Modeling in healthcare Modeling in financial applications Modeling physical phenomenon Modeling fault diagnosis system Modeling public transportation Modeling human behavior Next steps for simulation modeling Increasing the computational power Machine-learning-based models Automated generation of simulation models Summary Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts Download a free PDF copy of this book
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Hands-On Simulation Modeling with Python: Develop simulation models to help you get accurate results and enhance the decision-making process, 2nd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.