售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
IPython Interactive Computing and Visualization Cookbook Second Edition
Table of Contents
IPython Interactive Computing and Visualization CookbookSecond Edition
Why subscribe?
PacktPub.com
Contributors
About the author
Packt is Searching for Authors Like You
Preface
Who this book is for
What this book covers
Part 1 – Interactive Computing with Jupyter
Part 2 – Standard Methods in Data Science and Applied Mathematics
To get the most out of this book
Installing Python
GitHub repositories
Download the example code files
Download the color images
Conventions used
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Get in touch
Reviews
1. A Tour of Interactive Computing with Jupyter and IPython
Introduction
What is Python?
What is IPython?
What is Jupyter?
What is the SciPy ecosystem?
What's new in the SciPy ecosystem?
How to install Python
References
Introducing IPython and the Jupyter Notebook
Getting ready
How to do it...
There's more...
See also
Getting started with exploratory data analysis in the Jupyter Notebook
How to do it...
How it works...
There's more...
See also
Introducing the multidimensional array in NumPy for fast array computations
How to do it...
How it works...
There's more...
See also
Creating an IPython extension with custom magic commands
How to do it...
How it works...
The InteractiveShell class
Loading an extension
There's more...
See also
Mastering IPython's configuration system
How to do it...
How it works...
Configurables
Magics
There's more...
See also
Creating a simple kernel for Jupyter
How to do it...
How it works...
There's more...
2. Best Practices in Interactive Computing
Introduction
Learning the basics of the Unix shell
Getting ready
How to do it...
There's more...
See also
Using the latest features of Python 3
How to do it...
There's more...
Learning the basics of the distributed version control system Git
Getting ready
How to do it...
How it works...
There's more...
See also
A typical workflow with Git branching
Getting ready
How to do it...
How it works...
There's more...
See also
Efficient interactive computing workflows with IPython
How to do it...
The IPython terminal
IPython and text editor
The Jupyter Notebook
Integrated Development Environments
There's more...
See also
Ten tips for conducting reproducible interactive computing experiments
How to do it...
How it works...
There's more...
See also
Writing high-quality Python code
How to do it...
How it works...
There's more...
See also
Writing unit tests with pytest
Getting ready
How to do it...
How it works...
There's more...
Test coverage
Workflows with unit testing
Unit testing and continuous integration
Debugging code with IPython
How to do it...
The post-mortem mode
Step-by-step debugging
There's more...
3. Mastering the Jupyter Notebook
Introduction
The Notebook ecosystem
Architecture of the Jupyter Notebook
Connecting multiple clients to one kernel
JupyterHub
Security in notebooks
References
Teaching programming in the Notebook with IPython Blocks
Getting ready
How to do it...
Converting a Jupyter notebook to other formats with nbconvert
Getting ready
How to do it...
How it works...
There's more...
Mastering widgets in the Jupyter Notebook
Getting ready
How to do it...
There's more...
See also
Creating custom Jupyter Notebook widgets in Python, HTML, and JavaScript
How to do it...
There's more...
See also
Configuring the Jupyter Notebook
How to do it...
There's more...
See also
Introducing JupyterLab
Getting ready
How to do it...
There's more...
See also
4. Profiling and Optimization
Introduction
Evaluating the time taken by a command in IPython
How to do it...
How it works...
There's more...
See also
Profiling your code easily with cProfile and IPython
How to do it...
How it works...
There's more...
See also
Profiling your code line-by-line with line_profiler
Getting ready
How do to it...
How it works...
There's more...
See also
Profiling the memory usage of your code with memory_profiler
Getting ready
How to do it...
How it works...
There's more...
See also
Understanding the internals of NumPy to avoid unnecessary array copying
Getting ready
How to do it...
How it works...
Why are NumPy arrays efficient?
What is the difference between in-place and implicit-copy operations?
Why can't some arrays be reshaped without a copy?
What are NumPy broadcasting rules?
There's more...
See also
Using stride tricks with NumPy
Getting ready
How to do it...
How it works...
See also
Implementing an efficient rolling average algorithm with stride tricks
How to do it...
See also
Processing large NumPy arrays with memory mapping
How to do it...
How it works...
There's more...
See also
Manipulating large arrays with HDF5
Getting ready
How to do it...
How it works...
There's more...
See also
5. High-Performance Computing
Introduction
CPython and concurrent programming
Compiler-related installation instructions
Using Python to write faster code
How to do it...
There's more...
See also
Accelerating pure Python code with Numba and Just-In-Time compilation
Getting ready
How to do it...
How it works...
There's more...
See also
Accelerating array computations with NumExpr
Getting ready
How to do it...
How it works...
See also
Wrapping a C library in Python with ctypes
Getting ready
How to do it...
How it works...
There's more...
See also
Accelerating Python code with Cython
Getting ready
How to do it...
How it works...
There's more...
See also
Optimizing Cython code by writing less Python and more C
How to do it...
How it works...
There's more...
See also
Releasing the GIL to take advantage of multi-core processors with Cython and OpenMP
Getting ready
How to do it...
How it works...
See also
Writing massively parallel code for NVIDIA graphics cards (GPUs) with CUDA
Getting ready
How to do it...
How it works...
There's more...
See also
Distributing Python code across multiple cores with IPython
Getting started
How to do it...
How it works...
There's more...
References
See also
Interacting with asynchronous parallel tasks in IPython
Getting ready
How to do it...
How it works...
There's more...
See also
Performing out-of-core computations on large arrays with Dask
Getting ready
How to do it...
There's more...
See also
Trying the Julia programming language in the Jupyter Notebook
Getting ready
How to do it...
How it works...
There's more...
6. Data Visualization
Introduction
Using Matplotlib styles
How to do it...
There's more...
See also
Creating statistical plots easily with seaborn
How to do it...
There's more...
See also
Creating interactive web visualizations with Bokeh and HoloViews
Getting ready
How to do it...
There's more...
Visualizing a NetworkX graph in the Notebook with D3.js
Getting ready
How to do it...
There's more...
See also
Discovering interactive visualization libraries in the Notebook
Getting started
How to do it...
There's more
Creating plots with Altair and the Vega-Lite specification
Getting started...
How to do it...
How it works...
There's more...
See also
7. Statistical Data Analysis
Introduction
What is statistical data analysis?
A bit of vocabulary
Exploration, inference, decision, prediction
Univariate and multivariate methods
Frequentist and Bayesian methods
Parametric and nonparametric inference methods
Exploring a dataset with pandas and Matplotlib
How to do it...
There's more...
Getting started with statistical hypothesis testing — a simple z-test
Getting ready
How to do it...
How it works...
There's more...
See also
Getting started with Bayesian methods
Getting ready
How to do it...
How it works...
Bayes' theorem
Computation of the posterior distribution
Maximum a posteriori estimation
There's more...
Credible interval
Conjugate distributions
Non-informative (objective) prior distributions
See also
Estimating the correlation between two variables with a contingency table and a chi-squared test
How to do it...
How it works...
Pearson's correlation coefficient
Contingency table and chi-squared test
There's more...
See also
Fitting a probability distribution to data with the maximum likelihood method
Getting ready
How to do it...
How it works...
There's more...
See also
Estimating a probability distribution nonparametrically with a kernel density estimation
Getting ready
How to do it...
How it works...
See also
Fitting a Bayesian model by sampling from a posterior distribution with a Markov chain Monte Carlo method
Getting ready
How to do it...
How it works...
There's more...
See also
Analyzing data with the R programming language in the Jupyter Notebook
Getting ready
How to do it...
How it works...
There's more...
See also
8. Machine Learning
Introduction
A bit of vocabulary
Learning from data
Supervised learning
Unsupervised learning
Feature selection and feature extraction
Overfitting, underfitting, and the bias-variance tradeoff
Model selection
Machine learning references
Getting started with scikit-learn
Getting ready
How to do it...
How it works...
scikit-learn API
Ordinary Least Squares regression
Polynomial interpolation with linear regression
Ridge regression
Cross-validation and grid search
There's more...
Predicting who will survive on the Titanic with logistic regression
How to do it...
How it works...
There's more...
See also
Learning to recognize handwritten digits with a K-nearest neighbors classifier
How to do it...
How it works...
There's more...
See also
Learning from text – Naive Bayes for Natural Language Processing
How to do it...
How it works...
There's more...
See also
Using support vector machines for classification tasks
How to do it...
How it works...
There's more...
See also
Using a random forest to select important features for regression
How to do it...
How it works...
There's more...
See also
Reducing the dimensionality of a dataset with a principal component analysis
How to do it...
How it works...
There's more...
See also
Detecting hidden structures in a dataset with clustering
How to do it...
How it works...
There's more...
See also
9. Numerical Optimization
Introduction
The objective function
Local and global minima
Constrained and unconstrained optimization
Deterministic and stochastic algorithms
References
Finding the root of a mathematical function
How to do it...
How it works...
There's more…
See also
Minimizing a mathematical function
How to do it...
How it works...
There's more...
See also
Fitting a function to data with nonlinear least squares
How to do it...
How it works...
See also
Finding the equilibrium state of a physical system by minimizing its potential energy
How to do it...
How it works...
There's more...
See also
10. Signal Processing
Introduction
Analog and digital signals
The Nyquist–Shannon sampling theorem
Compressed sensing
References
Analyzing the frequency components of a signal with a Fast Fourier Transform
How to do it...
How it works...
The discrete Fourier transform
Inverse Fourier transform
There's more...
See also
Applying a linear filter to a digital signal
How to do it...
How it works...
What are linear filters?
Linear filters and convolutions
The FIR and IIR filters
Filters in the frequency domain
The low-, high-, and band-pass filters
There's more...
See also
Computing the autocorrelation of a time series
How to do it...
How it works...
There's more...
See also
11. Image and Audio Processing
Introduction
Images
Sounds
References
Manipulating the exposure of an image
Getting ready
How to do it...
How it works...
There's more...
See also
Applying filters on an image
How it works...
How it works...
There's more...
See also
Segmenting an image
How to do it...
How it works...
There's more...
See also
Finding points of interest in an image
How to do it...
How it works...
There's more...
Detecting faces in an image with OpenCV
Getting ready
How to do it...
How it works...
There's more...
Applying digital filters to speech sounds
Getting ready
How to do it
How it works...
There's more...
See also
Creating a sound synthesizer in the Notebook
How to do it...
How it works...
There's more...
See also
12. Deterministic Dynamical Systems
Introduction
Types of dynamical systems
Differential equations
References
Plotting the bifurcation diagram of a chaotic dynamical system
How to do it...
There's more...
See also
Simulating an elementary cellular automaton
How to do it...
How it works...
There's more...
Simulating an ordinary differential equation with SciPy
How to do it...
How it works...
There's more...
See also
Simulating a partial differential equation — reaction-diffusion systems and Turing patterns
How to do it...
How it works...
There's more...
13. Stochastic Dynamical Systems
Introduction
References
Simulating a discrete-time Markov chain
How to do it...
How it works...
There's more...
See also
Simulating a Poisson process
How to do it...
How it works...
There's more...
See also
Simulating a Brownian motion
How to do it...
How it works...
There's more...
See also
Simulating a stochastic differential equation
How to do it...
How it works...
There's more...
See also
14. Graphs, Geometry, and Geographic Information Systems
Introduction
Graphs
Problems in graph theory
Random graphs
Graphs in Python
Geometry in Python
Geographical information systems in Python
References
Manipulating and visualizing graphs with NetworkX
Getting ready
How to do it...
There's more...
See also
Drawing flight routes with NetworkX
Getting ready
How to do it...
See also
Resolving dependencies in a directed acyclic graph with a topological sort
How to do it...
How it works...
There's more...
Computing connected components in an image
How to do it...
How it works...
There's more...
Computing the Voronoi diagram of a set of points
Getting ready
How to do it...
How it works...
There's more...
See also
Manipulating geospatial data with Cartopy
Getting ready
How to do it...
There's more...
See also
Creating a route planner for a road network
Getting ready
How to do it...
How it works...
There's more...
15. Symbolic and Numerical Mathematics
Introduction
LaTeX
Diving into symbolic computing with SymPy
Getting ready
How to do it...
How it works...
See also
Solving equations and inequalities
How to do it...
There's more...
Analyzing real-valued functions
How to do it...
There's more...
Computing exact probabilities and manipulating random variables
How to do it...
How it works...
There's more...
A bit of number theory with SymPy
Getting ready
How to do it...
How it works...
There's more...
Finding a Boolean propositional formula from a truth table
How to do it...
How it works...
There's more...
Analyzing a nonlinear differential system — Lotka-Volterra (predator-prey) equations
Getting ready
How to do it...
How it works...
There's more...
Getting started with Sage
Getting ready
How to do it...
There's more...
See also
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜