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 – Interactive Computing with Jupyter Part – 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 it… How it works… There's more… See also Get in touch Reviews 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 it There's more See also Getting started with exploratory data analysis in the Jupyter Notebook How to it How it works There's more See also Introducing the multidimensional array in NumPy for fast array computations How to it How it works There's more See also Creating an IPython extension with custom magic commands How to it How it works The InteractiveShell class Loading an extension There's more See also Mastering IPython's configuration system How to it How it works Configurables Magics There's more See also Creating a simple kernel for Jupyter How to it How it works There's more Best Practices in Interactive Computing Introduction Learning the basics of the Unix shell Getting ready How to it There's more See also Using the latest features of Python How to it There's more Learning the basics of the distributed version control system Git Getting ready How to it How it works There's more See also A typical workflow with Git branching Getting ready How to it How it works There's more See also Efficient interactive computing workflows with IPython How to 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 it How it works There's more See also Writing high-quality Python code How to it How it works There's more See also Writing unit tests with pytest Getting ready How to it How it works There's more Test coverage Workflows with unit testing Unit testing and continuous integration Debugging code with IPython How to it The post-mortem mode Step-by-step debugging There's more 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 it Converting a Jupyter notebook to other formats with nbconvert Getting ready How to it How it works There's more Mastering widgets in the Jupyter Notebook Getting ready How to it There's more See also Creating custom Jupyter Notebook widgets in Python, HTML, and JavaScript How to it There's more See also Configuring the Jupyter Notebook How to it There's more See also Introducing JupyterLab Getting ready How to it There's more See also Profiling and Optimization Introduction Evaluating the time taken by a command in IPython How to it How it works There's more See also Profiling your code easily with cProfile and IPython How to it How it works There's more See also Profiling your code line-by-line with line_profiler Getting ready How to it How it works There's more See also Profiling the memory usage of your code with memory_profiler Getting ready How to it How it works There's more See also Understanding the internals of NumPy to avoid unnecessary array copying Getting ready How to 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 it How it works See also Implementing an efficient rolling average algorithm with stride tricks How to it See also Processing large NumPy arrays with memory mapping How to it How it works There's more See also Manipulating large arrays with HDF5 Getting ready How to it How it works There's more See also High-Performance Computing Introduction CPython and concurrent programming Compiler-related installation instructions Using Python to write faster code How to it There's more See also Accelerating pure Python code with Numba and Just-In-Time compilation Getting ready How to it How it works There's more See also Accelerating array computations with NumExpr Getting ready How to it How it works See also Wrapping a C library in Python with ctypes Getting ready How to it How it works There's more See also Accelerating Python code with Cython Getting ready How to it How it works There's more See also Optimizing Cython code by writing less Python and more C How to 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 it How it works See also Writing massively parallel code for NVIDIA graphics cards (GPUs) with CUDA Getting ready How to it How it works There's more See also Distributing Python code across multiple cores with IPython Getting started How to it How it works There's more References See also Interacting with asynchronous parallel tasks in IPython Getting ready How to it How it works There's more See also Performing out-of-core computations on large arrays with Dask Getting ready How to it There's more See also Trying the Julia programming language in the Jupyter Notebook Getting ready How to it How it works There's more Data Visualization Introduction Using Matplotlib styles How to it There's more See also Creating statistical plots easily with seaborn How to it There's more See also Creating interactive web visualizations with Bokeh and HoloViews Getting ready How to it There's more Visualizing a NetworkX graph in the Notebook with D3.js Getting ready How to it There's more See also Discovering interactive visualization libraries in the Notebook Getting started How to it There's more Creating plots with Altair and the Vega-Lite specification Getting started How to it How it works There's more See also 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 it There's more Getting started with statistical hypothesis testing — a simple z-test pandas 0.21 URL / What's new in the SciPy ecosystem? pandoc URL / Getting ready parameter vector / Ordinary Least Squares regression parametric estimation method / Estimating a probability distribution nonparametrically with a kernel density estimation parametric method about / Parametric and nonparametric inference methods partial derivatives / Types of dynamical systems Partial Differential Equations (PDEs) / Types of dynamical systems simulating / Simulating a partial differential equation — reaction-diffusion systems and Turing patterns, How to it , How it works references / There's more partitions / Supervised learning PCA URL / There's more Pearson correlation coefficient about / Pearson's correlation coefficient URL / Pearson's correlation coefficient physical system equilibrium state, finding by potential energy minimization / Finding the equilibrium state of a physical system by minimizing its potential energy, How to it , How it works , There's more pip / How to install Python pipes about / How to it plate carrée / How to it Plotly URL / There's more podoc module URL / The Jupyter Notebook point process / Simulating a Poisson process point processes / Introduction points of interest searching, of image / Finding points of interest in an image, How to it , How it works Poisson process about / How to it URL / How to it simulating / Simulating a Poisson process, How to it , How it works references / There's more polynomial interpolation with linear regression / Polynomial interpolation with linear regression potential energy URL / There's more Power Spectral Density about / How to it prediction about / Exploration, inference, decision, prediction prime-counting function / How to it prime number theorem / How to it principal component / How it works principal component analysis data dimensionality, reducing / Reducing the dimensionality of a dataset with a principal component analysis, How to it , How it works Principal Component Analysis (PCA) / Reducing the dimensionality of a dataset with a principal component analysis principle of minimum energy URL / There's more principle of minimum total potential energy / How it works prior probability distribution about / How to it probabilistic model about / Parametric and nonparametric inference methods probability distribution applying, to data with maximum likelihood method / Fitting a probability distribution to data with the maximum likelihood method, How to it , How it works probability distribution nonparametrically estimating, with kernel density estimation / Estimating a probability distribution nonparametrically with a kernel density estimation, How to it , How it works Probability Mass Function (PMF) about / How to it probit model URL / Supervised learning profile / Introduction profiling / Profiling your code easily with cProfile and IPython pstats reference / There's more pull request / There's more pure tone / How it works py.test unit tests, writing / Writing unit tests with pytest, How to it , How it works PyCall / There's more PyCharm / Integrated Development Environments pydot / How it works pyjulia / There's more Pylint URL / How to it PyMC3 references / Fitting a Bayesian model by sampling from a posterior distribution with a Markov chain Monte Carlo method PyPy URL / Introduction PyTables optimization guide reference / There's more Python about / What is Python? installing / How to install Python references / References, Introduction profiling tools, reference / There's more compilers, using / Compiler-related installation instructions C library, wrapping with ctypes / Wrapping a C library in Python with ctypes, How to it , How it works Python features, using / Using the latest features of Python 3, How to it , There's more references / There's more URL / There's more Python code writing / Writing high-quality Python code, How to it references / There's more improving / Using Python to write faster code, How to it accelerating, with Numba / Accelerating pure Python code with Numba and Just-In-Time compilation, How to it , How it works accelerating, with Just-In-Time compilation / Accelerating pure Python code with Numba and Just-In-Time compilation, How to it , How it works accelerating, with Cython / Accelerating Python code with Cython, How to it , How it works distributing, across multiple cores with IPython / Distributing Python code across multiple cores with IPython, How to it , How it works , There's more Python debuggers URL / There's more Python Enhancement Proposal number (PEP8) URL / How to it Python Package Index (PyPI) URL / How to install Python Python Tools for Visual Studio (PTVS) / Integrated Development Environments pythreejs / Discovering interactive visualization libraries in the Notebook Q Quasi-Newton methods / How it works URL / There's more Quine-McCluskey algorithm / How it works URL / There's more R R URL / Analyzing data with the R programming language in the Jupyter Notebook data, analyzing in Jupyter Notebook / Analyzing data with the R programming language in the Jupyter Notebook, How to it , How it works references / There's more Rackspace URL / There's more Radial Basis Function (RBF) / How to it Random Access Memory (RAM) / Why are NumPy arrays efficient? random forest about / Using a random forest to select important features for regression used, for selecting features for regression / Using a random forest to select important features for regression, How to it , How it works RandomForestRegressor URL, for API / There's more random forests URL / There's more random graphs / Random graphs random subspace method / How it works URL / There's more random variable about / How to it Ray tracing / Optimizing Cython code by writing less Python and more C URL / How it works reachability relation / How it works reaction-diffusion system / Simulating a partial differential equation — reaction-diffusion systems and Turing patterns reaction-diffusion systems references / There's more URL / There's more Read-Eval-Print Loop (REPL) / Efficient interactive computing workflows with IPython Read-Evaluate-Print Loop (REPL) about / Architecture of the Jupyter Notebook real-valued functions analyzing / Analyzing real-valued functions, How to it real analysis references / There's more rebasing / How it works red, green, and blue (RGB) / Images regions / How it works regression / Supervised learning regression analysis references / There's more regularization URL / Overfitting, underfitting, and the bias-variance tradeoff regularization term about / How to it reproducible interactive computing experiments conducting / Ten tips for conducting reproducible interactive computing experiments, How to it , How it works , There's more references / There's more RequireJS URK / There's more reStructuredText (reST) URL / How to it ridge regression about / How to it / Ridge regression RISE URL / There's more robust model / Overfitting, underfitting, and the bias-variance tradeoff Rodeo / Integrated Development Environments rolling average algorithm implementing, with stride tricks / Implementing an efficient rolling average algorithm with stride tricks, How to it about / Implementing an efficient rolling average algorithm with stride tricks rolling mean / How to it route planner creating, for road network / Creating a route planner for a road network, How to it , How it works row-major order / Why can't some arrays be reshaped without a copy? rpy2 URL / Getting ready Rule 110 URL / There's more Rule 110 automaton / How it works rule of thumb / How it works S Sage / Introduction URL / Getting started with Sage about / Getting started with Sage, How to it , There's more references / Getting ready, There's more sample / Learning from data Scalable Vector Graphics (SVG) about / How to it scientific Python references / References scikit-learn / Introduction URL / Feature selection and feature extraction, Getting started with scikit-learn, How it works about / Getting started with scikit-learn, How to it , How it works API / scikit-learn API Ordinary Least Squares regression / Ordinary Least Squares regression polynomial interpolation, with linear regression / Polynomial interpolation with linear regression ridge regression / Ridge regression cross-validation / Cross-validation and grid search grid search / Cross-validation and grid search references / There's more text data, handling / Learning from text – Naive Bayes for Natural Language Processing, How to it , How it works SciPy URL / What is the SciPy ecosystem? ODEs, simulating / Simulating an ordinary differential equation with SciPy, How to it , How it works SciPy 1.0 URL / What's new in the SciPy ecosystem? SciPy ecosystem about / What is the SciPy ecosystem?, What's new in the SciPy ecosystem? Scott's Rule / How it works seaborn statistical plots, creating / Creating statistical plots easily with seaborn, How to it , There's more references / There's more sequential locality / Why are NumPy arrays efficient? Shapefile URL / Manipulating geospatial data with Cartopy shortest paths URL / Problems in graph theory shortest paths, in NetworkX references / There's more sigmoid function / How it works SIMD paradigm about / Writing massively parallel code for NVIDIA graphics cards (GPUs) with CUDA Single Instruction, Multiple Data (SIMD) / Understanding the internals of NumPy to avoid unnecessary array copying, There's more Singular Value Decomposition (SVD) / How it works SnakeViz reference / There's more Sobel filter / How it works URL / There's more sounds / Sounds sound synthesizer creating, in Notebook / Creating a sound synthesizer in the Notebook, How to it , How it works spam filtering / Supervised learning sparse decomposition about / Compressed sensing sparse matrices about / There's more reference / There's more sparse matrix / How to it spatial locality / Why are NumPy arrays efficient? Sphinx URL / How to it Split Bregman algorithm URL / There's more Split Bregman method / How it works Spyder / Integrated Development Environments state diagram / How it works statistical data analysis about / What is statistical data analysis? statistical hypothesis testing about / Getting started with statistical hypothesis testing — a simple z-test, How to it , How it works URL / There's more statistical inference about / Exploration, inference, decision, prediction Statistical Learning URL / Machine learning references statistical plots creating, with seaborn / Creating statistical plots easily with seaborn, How to it , There's more statistics references / Parametric and nonparametric inference methods statistics resources URL / Parametric and nonparametric inference methods stats module / How it works URL / There's more Stochastic cellular automata / Introduction Stochastic differential equations (SDEs) simulating / Simulating a stochastic differential equation, How to it , How it works Stochastic Differential Equations (SDEs) / Introduction URL / There's more stochastic dynamical systems / Introduction URL / References Stochastic Partial Differential Equations (SPDEs) / Introduction Stochastic processes URL / References stream processors / How it works strided indexing scheme / How it works strides / Why can't some arrays be reshaped without a copy? stride tricks using, in NumPy / Using stride tricks with NumPy, How to it , How it works used, for implementing rolling average algorithm / Implementing an efficient rolling average algorithm with stride tricks, How to it structure tensor / How it works URL / There's more structuring element / How it works Sum of Products URL / There's more supervised learning / Learning from data, Supervised learning Support Vector Classifier (SVC) / How to it support vector machines (SVM) using, for classification tasks / Using support vector machines for classification tasks, How to it , How it works URL / Using support vector machines for classification tasks references / There's more SVD decomposition URL / There's more symbolic computing exploring, with SymPy / Diving into symbolic computing with SymPy, How to it , See also SymPy / Introduction used, for symbolic computing exploration / Diving into symbolic computing with SymPy, How to it , See also equations, solving / Solving equations and inequalities, How to it inequalities, solving / Solving equations and inequalities, How to it probabilities, computing / Computing exact probabilities and manipulating random variables, How to it , How it works random variables, manipulating / Computing exact probabilities and manipulating random variables, How to it , How it works number theory / A bit of number theory with SymPy, How to it , How it works , There's more synthesizer URL / There's more T t-Distributed Stochastic Neighbor Embedding (t-SNE) references / There's more term frequency-inverse document frequency (tf-idf) / How it works URL / There's more Test-driven development (TDD) about / Workflows with unit testing URL / Unit testing and continuous integration test functions for optimization URL / How to it test set / Supervised learning test statistic about / How to it text feature extraction URL / There's more thread / How it works Tikhonov regularization URL / Ridge regression timbre / How it works time series about / Introduction, How it works autocorrelation, computing / Computing the autocorrelation of a time series, How to it references / There's more topological sort documentation URL / There's more topological sorting dependencies, resolving in directed acyclic graph / Resolving dependencies in a directed acyclic graph with a topological sort, How to it , How it works , There's more URL / There's more total variation / How it works total variation denoising / How it works trace module reference / There's more training set / Supervised learning traitlets package URL / Mastering IPython's configuration system transition matrix / How it works Travis CI URL / Unit testing and continuous integration two-dimensional array / How to it U underfitting / Overfitting, underfitting, and the bias-variance tradeoff Uniform Manifold Approximation and Projection (UMAP) URL / There's more uninformative priors URL / Non-informative (objective) prior distributions United States Census Bureau URL / How to it unit tests writing, with py.test / Writing unit tests with pytest, How to it , How it works test coverage / Test coverage workflows / Workflows with unit testing univariate method about / Univariate and multivariate methods Unix shell about / Learning the basics of the Unix shell, How to it , There's more references / There's more unsupervised learning / Learning from data about / Unsupervised learning clustering / Unsupervised learning density estimation / Unsupervised learning dimension reduction / Unsupervised learning manifold learning / Unsupervised learning URL / There's more unsupervised learning methods / Reducing the dimensionality of a dataset with a principal component analysis V Vandermonde matrix URL / Polynomial interpolation with linear regression variable / Learning from data variance / Overfitting, underfitting, and the bias-variance tradeoff vector / How it works vectorized instructions / Why are NumPy arrays efficient? vectorizer URL / There's more Vega / There's more , Creating plots with Altair and the VegaLite specification Vega-Lite plots, creating / Creating plots with Altair and the Vega-Lite specification, How to it , How it works , There's more references / There's more vertices about / Graphs views / What is the difference between in-place and implicit-copy operations? Viola-Jones object detection framework / How to it URL / There's more VirtualBox URL / Getting ready vocabulary / How to it voice frequency URL / There's more Voronoi diagram computing, of set of points / Computing the Voronoi diagram of a set of points, How to it , How it works URL / There's more W wavelet transform / Inverse Fourier transform white box model / How it works white noise / How it works URL / There's more Wiener process / Simulating a Brownian motion URL / There's more Windows compilers URL / Compiler-related installation instructions Windows operating system URL / Learning the basics of the Unix shell Wolfram code URL / There's more X xarray library URL / There's more Z Zachary's Karate Club graph / How to it ZeroMQ (ZMQ) URL / Architecture of the Jupyter Notebook ... There's more See also Index IPython Interactive Computing and Visualization Cookbook Second Edition IPython Interactive Computing and Visualization CookbookSecond Edition Copyright © 2018 Packt... numerical computing, parallel computing, and high-performance data visualization He is the author of Learning IPython for Interactive Computing and Data Visualization, Second Edition, Packt Publishing,... – Interactive Computing with Jupyter Chapter 1, A Tour of Interactive Computing with Jupyter and IPython, contains a brief introduction to data analysis and numerical computing with IPython and