Sign up
Forgot password?
FAQ: Login

Morley S. Applying Math with Python: Practical recipes for solving computational math problems using Python programming and its libraries

  • pdf file
  • size 17,56 MB
  • added by
  • info modified
Morley S. Applying Math with Python: Practical recipes for solving computational math problems using Python programming and its libraries
New York: Packt Publishing, 2020 — 383 p.
Python, one of the world's most popular programming languages, has several powerful packages to help you tackle complex mathematical problems in a simple and efficient way. These core capabilities help programmers pave the way for building exciting applications in various domains, such as machine learning and data science, using knowledge in the computational mathematics domain.
The book teaches you how to solve problems faced in a wide variety of mathematical fields, including calculus, probability, statistics and data science, graph theory, optimization, and geometry. You'll start by developing core skills and learning about packages covered in Python’s scientific stack, including NumPy, SciPy, and Matplotlib. As you advance, you'll get to grips with more advanced topics of calculus, probability, and networks (graph theory). After you gain a solid understanding of these topics, you'll discover Python's applications in data science and statistics, forecasting, geometry, and optimization. The final chapters will take you through a collection of miscellaneous problems, including working with specific data formats and accelerating code.
By the end of this book, you'll have an arsenal of practical coding solutions that can be used and modified to solve a wide range of practical problems in computational mathematics and data science.
Basic Packages, Functions, and Concepts.
Technical requirements.
Python numerical types.
Decimal type.
Fraction type.
Complex type.
Basic mathematical functions.
NumPy arrays.
Element access.
Array arithmetic and functions.
Useful array creation routines.
Higher dimensional arrays.
Matrices.
Basic methods and properties.
Matrix multiplication.
Determinants and inverses.
Systems of equations.
Eigenvalues and eigenvectors.
Sparse matrices.
Further reading.
Chapter 2: Mathematical Plotting with Matplotlib.
Technical requirements.
Basic plotting with Matplotlib.
Getting ready.
How to do it...
How it works...
There's more...
Changing the plotting style.
Getting ready.
How to do it...
How it works...
There's more...
Adding labels and legends to plots.
How to do it...
How it works...
Adding subplots.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Saving Matplotlib figures.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Surface and contour plots.
Getting ready.
How to do it...
How it works...
There's more...
Customizing three-dimensional plots.
Getting ready.
How to do it...
How it works...
There's more...
Further reading.
Chapter 3: Calculus and Differential Equations.
Technical requirements.
Working with polynomials and calculus.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Differentiating and integrating symbolically using SymPy.
Getting ready.
How to do it...
How it works...
There's more...
Solving equations.
Getting ready.
How to do it...
How it works...
There's more...
Integrating functions numerically using SciPy.
Getting ready.
How to do it...
How it works...
There's more...
Solving simple differential equations numerically.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Solving systems of differential equations.
Getting ready.
How to do it...
How it works...
There's more...
Solving partial differential equations numerically.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Using discrete Fourier transforms for signal processing.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Further reading.
Chapter 4: Working with Randomness and Probability.
Technical requirements.
Selecting items at random.
Getting ready.
How to do it...
How it works...
There's more...
Generating random data.
Getting ready.
How to do it...
How it works...
There's more...
Changing the random number generator.
Getting ready.
How to do it...
How it works...
There's more...
Generating normally distributed random numbers.
Getting ready.
How to do it...
How it works...
There's more...
Working with random processes.
Getting ready.
How to do it...
How it works...
There's more...
Analyzing conversion rates with Bayesian techniques.
Getting ready.
How to do it...
How it works...
There's more...
Estimating parameters with Monte Carlo simulations.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Further reading.
Chapter 5: Working with Trees and Networks.
Technical requirements.
Creating networks in Python.
Getting ready.
How to do it...
How it works...
There's more...
Visualizing networks.
Getting ready.
How to do it...
How it works...
There's more...
Getting the basic characteristics of networks.
Getting ready.
How to do it...
How it works...
There's more...
Generating the adjacency matrix for a network.
Getting ready.
How to do it...
How it works...
There's more...
Creating directed and weighted networks.
Getting ready.
How to do it...
How it works...
There's more...
Finding the shortest paths in a network.
Getting ready.
How to do it...
How it works...
There's more...
Quantifying clustering in a network.
Getting ready.
How to do it...
How it works...
There's more...
Coloring a network.
Getting ready.
How to do it...
How it works...
There's more...
Finding minimal spanning trees and dominating sets.
Getting ready.
How to do it...
How it works...
Further reading.
Chapter 6: Working with Data and Statistics.
Technical requirements.
Creating Series and DataFrame objects.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Loading and storing data from a DataFrame.
Getting ready.
How to do it...
How it works...
See also.
Manipulating data in DataFrames.
Getting ready.
How to do it...
How it works...
There's more...
Plotting data from a DataFrame.
Getting ready.
How to do it...
How it works...
There's more...
Getting descriptive statistics from a DataFrame.
Getting ready.
How to do it...
How it works...
There's more...
Understanding a population using sampling.
Getting ready.
How to do it...
How it works...
See also.
Testing hypotheses using t-tests.
Getting ready.
How to do it...
How it works...
There's more...
Testing hypotheses using ANOVA.
Getting ready.
How to do it...
How it works...
There's more...
Testing hypotheses for non-parametric data.
Getting ready.
How to do it...
How it works...
Creating interactive plots with Bokeh.
Getting ready.
How to do it...
How it works...
There's more...
Further reading.
Chapter 7: Regression and Forecasting.
Technical requirements.
Using basic linear regression.
Getting ready.
How to do it...
How it works...
There's more...
Using multilinear regression.
Getting ready.
How to do it...
How it works...
Classifying using logarithmic regression.
Getting ready.
How to do it...
How it works...
There's more...
Modeling time series data with ARMA.
Getting ready.
How to do it...
How it works...
There's more...
Forecasting from time series data using ARIMA.
Getting ready.
How to do it...
How it works...
Forecasting seasonal data using ARIMA.
Getting ready.
How to do it...
How it works...
There's more...
Using Prophet to model time series data.
Getting ready.
How to do it...
How it works...
There's more...
Further reading.
Chapter 8: Geometric Problems.
Technical requirements.
Visualizing two-dimensional geometric shapes.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Finding interior points.
Getting ready.
How to do it...
How it works...
Finding edges in an image.
Getting ready.
How to do it...
How it works...
Triangulating planar figures.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Computing convex hulls.
Getting ready.
How to do it...
How it works...
Constructing Bezier curves.
Getting ready.
How to do it...
How it works...
There's more...
Further reading.
Chapter 9: Finding Optimal Solutions.
Technical requirements.
Minimizing a simple linear function.
Getting ready.
How to do it...
How it works...
There's more...
Minimizing a non-linear function.
Getting ready.
How to do it...
How it works...
There's more...
Using gradient descent methods in optimization.
Getting ready.
How to do it...
How it works...
There's more...
Using least squares to fit a curve to data.
Getting ready.
How to do it...
How it works...
There's more...
Analyzing simple two-player games.
Getting ready.
How to do it...
How it works...
There's more...
Computing Nash equilibria.
Getting ready.
How to do it...
How it works...
There's more...
See also.
Further reading.
Chapter 10: Miscellaneous Topics.
Technical requirements.
Keeping track of units with Pint.
Getting ready.
How to do it...
How it works...
There's more...
Accounting for uncertainty in calculations.
Getting ready.
How to do it...
How it works...
There's more...
Loading and storing data from NetCDF files.
Getting ready.
How to do it...
How it works...
There's more...
Working with geographical data.
Getting ready.
How to do it...
How it works...
Executing a Jupyter notebook as a script.
Getting ready.
How to do it...
How it works...
There's more...
Validating data.
Getting ready.
How to do it...
How it works...
Working with data streams.
Getting ready.
How to do it...
How it works...
See also.
Accelerating code with Cython.
Getting ready.
How to do it...
How it works...
There's more...
Distributing computing with Dask.
Getting ready.
How to do it...
How it works...
There's more...
Other Books You May Enjoy.
  • Sign up or login using form at top of the page to download this file.
  • Sign up
Up