Preface

This book is a comprehensive guide to understanding various computational statistical simulations using Python.

This book starts with the foundation required to understand various methods and techniques before delving into complex topics. Developers working with simulation models will be able to put their knowledge to work with this practical guide. The book takes 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 models and understand how to use several Python packages. You will then explore various numerical simulation algorithms and concepts, such as a Markov Decision Process, Monte Carlo methods, and bootstrapping techniques.

By the end of this book, you will be able to construct simulation models.

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 and statistical simulation using Python.

What this book covers

Chapter 1, Introducing Simulation Models, introduces simulation models, their various types, and examples of simulation model applications in the world.

Chapter 2, Understanding Randomness and Random Numbers, explores the stochastic process and various random number simulation concepts. You will learn how to distinguish between pseudo- and non-uniform numbers, and explore various methods for random distribution evaluation. Finally, you will explore some cryptography techniques.

Chapter 3, Probability and Data Generating Processes, introduces the concept of probability theory, and how to calculate the probability of a cause that triggers certain events. You will also learn how to work with discrete and continuous distributions, and finally, you will learn various techniques and tools for data generation.

Chapter 4, Exploring Monte Carlo Simulations, explores the Monte Carlo simulation and some of its applications. You will discover how to generate a sequence of numbers randomly distributed according to a Gaussian distribution. You will also learn how to implement the Monte Carlo method practically, and finally, you will learn about the basics of sensitivity analysis and cross-entropy.

Chapter 5, Simulation-Based Markov Decision Processes, will see you get to grips with the Markov process and understanding the whole interaction between agent and environment. You will learn to use Bellman equations. You will also discover what Markov chains are, learn how to use them, and simulate random walks using them.

Chapter 6, Resampling Methods, tells you how to obtain robust estimates of confidence intervals and standard errors of population parameters. You will learn how to estimate the distortion and standard error of a statistic, perform a test for statistical significance, and finally, validate a forecast model.

Chapter 7, Using Simulation to Improve and Optimize Systems, shows the basic concepts of optimization techniques, and how to implement them. You will understand the difference between numerical and stochastic optimization techniques. You’ll learn how to implement the Stochastic Gradient Descent and estimate missing or latent variables and optimize model parameters. Finally, you will discover how to use optimization methods in real-life applications.

Chapter 8, Introducing Evolutionary Systems, explores the basic concepts of soft computing, genetic programming, and various evolutionary systems. You will learn how to apply genetic algorithms for search and optimization, and you will also explore a cellular automation model.

Chapter 9, Using Simulation Models for Financial Engineering, shows some practical use cases for using simulation methods in a financial context.

Chapter 10, Simulating Physical Phenomena Using Neural Networks, explores artificial neural networks and how to implement them, and also how neural network algorithms work. You will learn about deep neural networks. Finally, you will explore graph neural networks, and learn how to use neural networks to simulate physical phenomena, such as particles and point objects, and Lattice Boltzmann modeling of fluid flows.

Chapter 11, Modeling and Simulation for Project Management, covers various project management concepts and explores a few practical use cases of simulation modeling for project management.

Chapter 12, Simulation Models for Fault Diagnosis in Dynamic Systems, covers fault diagnosis in various systems and explores a few use cases of simulation modeling for fault detection and diagnosis in various systems such as UAVs.

Chapter 13, What's Next?, summarizes simulation modeling and explores the main applications in real life that make use of it. You will also learn about the future of simulation modeling.

To get the most out of this book

Software/hardware covered in the book

Operating system requirements

Python 3.x

Windows, macOS, or Linux

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Hands-On-Simulation-Modeling-with-Python-Second-Edition. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The numpy library is a Python library containing numerous functions that can help us in the management of multidimensional matrices.”

A block of code is set as follows:

np.random.seed(4)
n = 1000
sqn = 1/np.math.sqrt(n)
z_values = np.random.randn(n)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

AmznData = pd.read_csv('AMZN.csv',header=0, 
           usecols = ['Date',Close'],parse_dates=True,
           index_col='Date')

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Select System info from the Administration panel.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Hands-On Simulation Modeling with Python, Second Edition, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere? Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

  1. Scan the QR code or visit the link below

https://packt.link/free-ebook/9781804616888

  1. Submit your proof of purchase
  2. That’s it! We’ll send your free PDF and other benefits to your email directly
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.128.105