Book Image

Mastering Python Scientific Computing

Book Image

Mastering Python Scientific Computing

Overview of this book

Table of Contents (17 chapters)
Mastering Python Scientific Computing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Synthetic data generation (fabrication)


In this section, we will discuss the various methods of synthetic numerical data generation. We will also present an algorithm for random number generation using the Poisson distribution and its Python implementation. Furthermore, we will explore different methods for synthetic text data generation.

Using Python's built-in functions for random number generation

Python has a module named random that implements various pseudo-random number generators on the basis of various statistical distributions. This module has functions for various types of randomness, such as for integers, for sequences, for random permutations of a list, and to generate a random sample from a predefined population. The Python random module supports random number generation using various statistical distributions, including uniform, normal (Gaussian), lognormal, negative exponential, gamma, and beta distributions. To generate a uniform random angle, Python provides the von Mises...