Page 536 - Python Data Science Handbook
P. 536
concatenation, 48, 142 model selection and, 364-366
creating copies, 46 bicycle traffic prediction
creating from Python lists, 39 linear regression, 400
creating from scratch, 39 time series, 202-209
data as, 33 big-O notation, 92
DataFrame object as, 102 binary ufuncs, 52
DataFrame object constructed from, 105 binnings, 248
fixed-type, 38 bitwise logic operators, 74
Index object as immutable array, 106 bogosort, 86
Index object vs., 106 Bokeh, 330
indexing: accessing single elements, 43 Boolean arrays
reshaping, 47 Boolean operators and, 74
Series object vs., 99 counting entries in, 73
slicing, 44 working with, 73-75
slicing multidimensional subarrays, 45 Boolean masks, 70-78
slicing one-dimensional subarrays, 44 Boolean arrays as, 75-78
sorting, 85-96 rainfall statistics, 70
specifying output to, 56 working with Boolean arrays, 73-75
splitting, 49 Boolean operators, 74
standard data types, 41 broadcasting, 63-69
structured, 92-96 adding two-dimensional array to one-
subarrays as no-copy views, 46 dimensional array, 66
summing values in, 59 basics, 63-65
universal functions, 50-58 centering an array, 68
arrows, 272-275 defined, 58, 63
asfreq() method, 197-199 in practice, 68
asterisk (*), 7 plotting two-dimensional function, 69
automagic function, 19 rules, 65-68
axes limits, 228-230 two compatible arrays, 66
two incompatible arrays, 67
B
bagging, 426 C
bandwidth (see kernel bandwidth) categorical data, 376
bar (|) operator, 77 class labels (for data point), 334
bar plots, 321 classification task
Basemap toolkit defined, 332
geographic data with, 298 machine learning, 333-335
(see also geographic data) clustering, 332
installation, 298 basics, 338-339
basis function regression, 378, 392-396 GMMs, 353, 476-491
Gaussian basis functions, 394-396 k-means, 339, 462-476
polynomial basis functions, 393 code
Bayesian classification, 383, 501-506 magic commands for determining execu‐
(see also naive Bayes classification) tion time, 12
Bayesian information criterion (BIC), 487 magic commands for pasting blocks, 11
Bayesian Methods for Hackers stylesheet, 288 magic commands for running external, 12
Bayess theorem, 383 profiling and timing, 25-30
bias–variance trade-off timing of snippets, 25-27
kernel bandwidth and, 497 coefficient of determination, 365
518 | Index

