List of examples
List of examples
Description | Type | Chap | Link |
---|---|---|---|
Quantitative data | βοΈ | 1 | Example exm-data-quantitative |
Floating-point numbers | π» | 1 | Example exm-data-float |
Infinity and NaN | π» | 1 | Example exm-data-inf-nan |
Dates and times in NumPy | π» | 1 | Example exm-data-datetime |
Vectors in Python | π» | 1 | Example exm-data-vector |
Accessing vector elements | π» | 1 | Example exm-data-access |
Slicing vectors | π» | 1 | Example exm-data-slice |
Arrays in Python | π» | 1 | Example exm-data-array |
Indexing arrays | π» | 1 | Example exm-data-array-index |
Array reductions | π» | 1 | Example exm-data-array-reduce |
Ordinal data | βοΈ | 1 | Example exm-data-categorical |
Dummy variables | βοΈ | 1 | Example exm-data-dummy |
Series | βοΈ | 1 | Example exm-data-series |
Series in pandas | π» | 1 | Example exm-data-series-create |
Operations on series | π» | 1 | Example exm-data-series-operate |
Series and frames in pandas | π» | 1 | Example exm-data-frames-create |
Operations on data frames | π» | 1 | Example exm-data-frames-operate |
Importing CSV data | π» | 1 | Example exm-data-read |
iloc for rows in a frame | π» | 1 | Example exm-data-row-iloc |
loc for rows in a frame | π» | 1 | Example exm-data-row-loc |
Selecting rows in a frame | π» | 1 | Example exm-data-row-select |
Concatenating data in pandas | π» | 1 | Example exm-data-concat |
Merging data in pandas | π» | 1 | Example exm-data-merge |
Merging data | π» | 1 | Example exm-data-merge-weather |
Handling missing values in pandas | π» | 1 | Example exm-data-missing |
Cleaning a data frame | π» | 1 | Example exm-data-loans |
Encoding qualitative data | π» | 1 | Example exm-data-encoding |
Dummy variables in pandas | π» | 1 | Example exm-data-dummies |
Summary statistics in pandas | π» | 2 | Example exm-stats-summary |
Standard deviation by hand | βοΈ | 2 | Example exm-stats-maxvar |
Sample variance | βοΈ | 2 | Example exm-stats-sample |
Mean, variance, STD in pandas | π» | 2 | Example exm-stats-meanvar-pandas |
Z scores | βοΈ, π» | 2 | Example exm-stats-zscores |
Z scores in Python | π» | 2 | Example exm-stats-zscores-py |
Median | βοΈ | 2 | Example exm-stats-median |
Quantiles | π» | 2 | Example exm-stats-quantiles |
Quartiles and IQR | π» | 2 | Example exm-stats-describe |
ECDF of penguins | π» | 2 | Example exm-stats-ecdf-penguins |
ECDF of a simple distribution | βοΈ | 2 | Example exm-stats-uniform-discrete |
ECDF of penguins | π» | 2 | Example exm-stats-ecdf-penguins |
CDF of a uniform distribution | βοΈ | 2 | Example exm-stats-uniform-continuous |
ECDF of temperatures | π» | 2 | Example exm-stats-temps-ecdf |
PDF of temperature distribution | βοΈ | 2 | Example exm-stats-temps-pdf |
PDF of a uniform distribution | βοΈ | 2 | Example exm-stats-uniform-pdf |
Uniform random numbers in NumPy | π» | 2 | Example exm-stats-numpy-uniform |
Normal distribution in NumPy | π» | 2 | Example exm-stats-normal |
Grouping data | π» | 2 | Example exm-stats-groups |
Facet plots | π» | 2 | Example exm-stats-groups-facet |
Box and violin plots | π» | 2 | Example exm-stats-groups-box-violin |
Aggregating data in groups | π» | 2 | Example exm-stats-groups-aggregation |
Grouping data by cuts | π» | 2 | Example exm-stats-groups-cuts |
Outliers for mean and median | βοΈ | 2 | Example exm-stats-median-mean |
Interquartile range | π» | 2 | Example exm-stats-outlier-iqr |
Outliers | π» | 2 | Example exm-stats-outlier-std |
Outliers and the Pearson coefficient | π» | 2 | Example exm-stats-pearson-outlier |
Spearman correlation coefficient | π» | 2 | Example exm-stats-spearman-outlier |
Categorical correlation | π» | 2 | Example exm-stats-catcorr |
The Datasaurus | π» | 2 | Example exm-stats-datasaurus |
Correlation vs. dependence | π» | 2 | Example exm-stats-correlation |
Simpsonβs paradox | π» | 2 | Example exm-stats-simpson |
Digit classification | π» | 3 | Example exm-class-digits |
Feature matrix | βοΈ | 3 | Example exm-class-emoji |
Trainβtest split | π» | 3 | Example exm-class-traintest |
Testing accuracy | π» | 3 | Example exm-class-accuracy |
Combined metrics | βοΈ | 3 | Example exm-class-scores-simple |
Multiclass one-vs-rest | βοΈ | 3 | Example exm-class-one-vs-rest |
Multiclass metrics | π» | 3 | Example exm-class-multiclass |
Decision tree | βοΈ | 3 | Example exm-class-tree |
Gini impurity | βοΈ | 3 | Example exm-class-gini-spread |
Gini impurity | βοΈ | 3 | Example exm-class-gini |
Tree partitioning | βοΈ | 3 | Example exm-class-tree-partition |
Inspecting a decision tree | π» | 3 | Example exm-class-tree-toy |
Tree classifier for the penguins dataset | π» | 3 | Example exm-class-tree-penguins |
Interpreting a decision tree | π» | 3 | Example exm-class-tree-penguins-interpret |
Calculating distance | βοΈ | 3 | Example exm-class-distance |
kNN classifier | βοΈ | 3 | Example exm-class-knn-small |
kNN classifier for the penguins dataset | π» | 3 | Example exm-class-knn |
kNN sensitivity to scaling | βοΈ | 3 | Example exm-class-knn-norm |
Pipeline for standardizing columns | π» | 3 | Example exm-class-knn-standard |
Probabilistic classifier | βοΈ, π» | 3 | Example exm-class-phat |
Probabilistic classifier for the penguins dataset | π» | 3 | Example exm-class-prob |
Varying decision threshold | π» | 3 | Example exm-class-hits |
ROC curve | π» | 3 | Example exm-class-roc |
Area under ROC curve | π» | 3 | Example exm-class-auc |
Hyperparameters | βοΈ | 4 | Example exm-select-hyper |
Learning curves | π» | 4 | Example exm-select-learning-curves |
Overfitting | π» | 4 | Example exm-select-overfit-digits |
Bagging ensemble classifier | π» | 4 | Example exm-select-ensemble-knn |
Bagging ensemble (better) | π» | 4 | Example exm-select-ensemble-knn-better |
Folds for validation | βοΈ | 4 | Example exm-select-folds |
Cross-validation grid search | π» | 4 | Example exm-select-grid-cancer |
Linear regression | βοΈ | 5 | Example exm-regression-linear |
Inner product | βοΈ | 5 | Example exm-regression-dot |
Mean squared and mean absolute error | βοΈ | 5 | Example exm-regression-mse-mae |
Coefficient of determination | βοΈ | 5 | Example exm-regression-cod |
Linear regression for sea ice dataset | π» | 5 | Example exm-regression-ice-linear |
Matrix times vector | βοΈ | 5 | Example exm-regression-matvec |
Multilinear regression for MPG dataset | π» | 5 | Example exm-regression-cars-multi |
Multilinear regression for sales dataset | π» | 5 | Example exm-regression-sales-multi |
Polynomial regression for the MPG dataset | π» | 5 | Example exm-regression-polynomial |
Overfitting in polynomial regression | π» | 5 | Example exm-regression-polynomial-high |
LASSO regression for diabetes dataset | π» | 5 | Example exm-regression-lasso-diabetes |
Random forest for regression | π» | 5 | Example exm-regression-tree-demo |
Cross-entropy | βοΈ | 5 | Example exm-regression-cross-entropy |
Logistic regression as a spam filter | π» | 5 | Example exm-regression-spam |
Distance matrix | βοΈ | 6 | Example exm-cluster-distmat-small |
Usage of pairwise_distances
|
π» | 6 | Example exm-cluster-distmat |
Angular distance | π» | 6 | Example exm-cluster-angular |
Rand index by hand | βοΈ | 6 | Example exm-cluster-rand |
Adjusted Rand index | π» | 6 | Example exm-cluster-ARI-blobs |
Silhouette values | βοΈ | 6 | Example exm-cluster-silhouette |
Silhouette values calculation | π» | 6 | Example exm-cluster-sil-blobs |
Silhouettes as performance metric | π» | 6 | Example exm-cluster-perform-digits |
Limitation of silhouettes | π» | 6 | Example exm-cluster-sil-bullseye |
Inertia | βοΈ | 6 | Example exm-cluster-inertia |
k-means on blobs dataset | π» | 6 | Example exm-cluster-kmeans-blobs |
k-means on stripes dataset | π» | 6 | Example exm-cluster-kmeans-stripes |
k-means on digits dataset | π» | 6 | Example exm-cluster-kmeans-digits |
Comparing linkages on simple datasets | π» | 6 | Example exm-cluster-linkage |
Agglomerative for penguins dataset | π» | 6 | Example exm-cluster-penguins |
Constructing networks/graphs | π» | 7 | Example exm-networks-construct |
Importing networks | π» | 7 | Example exm-networks-import |
Neighbors of a node | π» | 7 | Example exm-networks-neighbors |
Ego graph | π» | 7 | Example exm-networks-ego |
Node degrees | π» | 7 | Example exm-networks-degree |
Average degree | π» | 7 | Example exm-networks-avgdegree |
ER graphs | π» | 7 | Example exm-networks-degree-ER |
Clustering coefficient | βοΈ | 7 | Example exm-networks-cluster-small-world |
Clustering in the Twitch network | π» | 7 | Example exm-networks-cluster-twitch |
Clustering in ER graphs | π» | 7 | Example exm-networks-cluster-er |
Distances in a complete graph | βοΈ | 7 | Example exm-networks-distance-complete |
Distances in a wheel graph | π» | 7 | Example exm-networks-distance-wheel |
Connectedness | βοΈ | 7 | Example exm-networks-connected |
Distances in ER graphs | π» | 7 | Example exm-networks-distance-ER |
Degree distribution in the Twitch network | π» | 7 | Example exm-networks-ddist-twitch |
Degree distribution in the Twitch network | π» | 7 | Example exm-networks-ddist-ERWS |
BarabΓ‘siβAlbert graphs | π» | 7 | Example exm-networks-BA |
Power-law degrees in the Twitch network | π» | 7 | Example exm-networks-powerlaw-ba |
Betweenness centrality in the Twitch network | π» | 7 | Example exm-networks-centrality-btw-big |
Eigenvectors | βοΈ | 7 | Example exm-networks-centrality-eigvector |
Eigenvector centrality | βοΈ | 7 | Example exm-networks-centrality-eig |
Comparison of centrality metrics | π» | 7 | Example exm-networks-centrality-smallworld |
No matching items