Book description
Discover easy-to-follow solutions and techniques to help you to implement applied mathematical concepts such as probability, calculus, and equations using Python's numeric and scientific libraries
Key Features
- Compute complex mathematical problems using programming logic with the help of step-by-step recipes
- Learn how to use Python libraries for computation, mathematical modeling, and statistics
- Discover simple yet effective techniques for solving mathematical equations and apply them in real-world statistics
Book Description
The updated edition of Applying Math with Python will help you solve complex problems in a wide variety of mathematical fields in simple and efficient ways. Old recipes have been revised for new libraries and several recipes have been added to demonstrate new tools such as JAX.
You'll start by refreshing your knowledge of several core mathematical fields and learn about packages covered in Python's scientific stack, including NumPy, SciPy, and Matplotlib. As you progress, you'll gradually get to grips with more advanced topics of calculus, probability, and networks (graph theory). Once you’ve developed a solid base in these topics, you’ll have the confidence to set out on math adventures with Python as you explore 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.
What you will learn
- Become familiar with basic Python packages, tools, and libraries for solving mathematical problems
- Explore real-world applications of mathematics to reduce a problem in optimization
- Understand the core concepts of applied mathematics and their application in computer science
- Find out how to choose the most suitable package, tool, or technique to solve a problem
- Implement basic mathematical plotting, change plot styles, and add labels to plots using Matplotlib
- Get to grips with probability theory with the Bayesian inference and Markov Chain Monte Carlo (MCMC) methods
Who this book is for
Whether you are a professional programmer or a student looking to solve mathematical problems computationally using Python, this is the book for you. Advanced mathematics proficiency is not a prerequisite, but basic knowledge of mathematics will help you to get the most out of this Python math book. Familiarity with the concepts of data structures in Python is assumed.
Table of contents
- Applying Math with Python
- Contributors
- About the author
- About the reviewer
- Preface
- Chapter 1: An Introduction to Basic Packages, Functions, and Concepts
- Chapter 2: Mathematical Plotting with Matplotlib
-
Chapter 3: Calculus and Differential Equations
- Technical requirements
- Primer on calculus
- Working with polynomials and calculus
- Differentiating and integrating symbolically using SymPy
- Solving equations
- Integrating functions numerically using SciPy
- Solving simple differential equations numerically
- Solving systems of differential equations
- Solving partial differential equations numerically
- Using discrete Fourier transforms for signal processing
- Automatic differentiation and calculus using JAX
- Solving differential equations using JAX
- Further reading
-
Chapter 4: Working with Randomness and Probability
- Technical requirements
- Selecting items at random
- Generating random data
- Changing the random number generator
- Generating normally distributed random numbers
- Working with random processes
- Analyzing conversion rates with Bayesian techniques
- Estimating parameters with Monte Carlo simulations
- Further reading
-
Chapter 5: Working with Trees and Networks
- Technical requirements
- Creating networks in Python
- Visualizing networks
- Getting the basic characteristics of networks
- Generating the adjacency matrix for a network
- Creating directed and weighted networks
- Finding the shortest paths in a network
- Quantifying clustering in a network
- Coloring a network
- Finding minimal spanning trees and dominating sets
- Further reading
-
Chapter 6: Working with Data and Statistics
- What is statistics?
- Technical requirements
- Creating Series and DataFrame objects
- Loading and storing data from a DataFrame
- Manipulating data in DataFrames
- Plotting data from a DataFrame
- Getting descriptive statistics from a DataFrame
- Understanding a population using sampling
- Performing operations on grouped data in a DataFrame
- Testing hypotheses using t-tests
- Testing hypotheses using ANOVA
- Testing hypotheses for non-parametric data
- Creating interactive plots with Bokeh
- Further reading
-
Chapter 7: Using Regression and Forecasting
- Technical requirements
- Using multilinear regression
- Classifying using logarithmic regression
- Modeling time series data with ARMA
- Forecasting from time series data using ARIMA
- Forecasting seasonal data using ARIMA
- Using Prophet to model time series data
- Using signatures to summarize time series data
- Further reading
- Chapter 8: Geometric Problems
- Chapter 9: Finding Optimal Solutions
-
Chapter 10: Improving Your Productivity
- Technical requirements
- Keeping track of units with Pint
- Accounting for uncertainty in calculations
- Loading and storing data from NetCDF files
- Working with geographical data
- Executing a Jupyter notebook as a script
- Validating data
- Accelerating code with Cython
- Distributing computing with Dask
- Writing reproducible code for data science
- Index
- Other Books You May Enjoy
Product information
- Title: Applying Math with Python - Second Edition
- Author(s):
- Release date: December 2022
- Publisher(s): Packt Publishing
- ISBN: 9781804618370
You might also like
book
Doing Math with Python
Doing Math with Python shows you how to use Python to delve into high school—level math …
book
Applying Math with Python
Discover easy-to-follow solutions and techniques to help you to implement applied mathematical concepts such as probability, …
book
Numerical Python: Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib
Leverage the numerical and mathematical modules in Python and its standard library as well as popular …
book
Advanced Python Programming - Second Edition
Write fast, robust, and highly reusable applications using Python's internal optimization, state-of-the-art performance-benchmarking tools, and cutting-edge …