AI from scratch · Reference

Datasets

Every dataset used across the lessons and notebooks: raw files in ai/data/, standard scikit-learn loaders, and vision/language corpora. Includes provenance, dimensions, license terms, and lesson cross-references.

Course Datasets (ai/data/)

These files ship directly with the course repository in ai/data/, served locally or cached by the browser for Pyodide and notebooks.

Dataset Source & Provenance License Size / Shape Description & Key Columns Lessons
bank.csv UCI ML Repository (Moro et al., 2014; Bank Marketing) CC BY 4.0 10,297 rows × 21 cols Direct telemarketing campaigns of a Portuguese bank. Target y indicates term deposit subscription. Features include client demographics, economic indicators (euribor3m, cons.price.idx), and campaign contacts. Trees & boosting, Boosted trees, SVMs, Clusters & anomalies
outages.csv
outages.json
NYC Open Data / Metropolitan Transportation Authority (MTA) Public Domain 667 rows × 10 cols MTA elevator & escalator outages. Columns: equipment, station, lines, kind, reason, start, estimated_end, borough, is_planned, serving. Demonstrates real-world dirty tabular data and temporal leakage. pandas & scikit-learn, Serving, MLOps, Capstone
ridership.csv MTA Daily Ridership Data (NYC Open Data) Public Domain 1,776 rows × 3 cols Daily subway and bus ridership across New York City from 2020 through 2025. Columns: date, subway, bus. Used for trend decomposition, seasonal lag features, and honest walk-forward evaluation. Time series & forecasting, Linear models, Multilayer perceptron
sms-spam.tsv UCI ML Repository (Almeida & Gómez Hidalgo, 2012) CC BY 4.0 5,572 rows × 2 cols SMS text messages tagged as ham or spam. Used to build bag-of-words vocabularies, TF-IDF transformations, Naive Bayes spam classifiers, and linear SVM decision boundaries. Naive Bayes, Support Vector Machines
rail-stations.json MTA Open Data (Long Island Rail Road & Metro-North) Public Domain 396 stations Geographic coordinates, station names, passenger boardings, and ADA compliance status for regional rail stops. Used to illustrate vector distance operations and DBSCAN spatial clustering. NumPy in depth, Clusters & anomalies
glove-20k.txt
glove-20k.bin
Stanford NLP (Pennington, Socher, Manning, 2014) Public Domain (CC0) 20,000 words × 50 dimensions Pretrained GloVe word vectors trained on Wikipedia 2014 + Gigaword 5, trimmed to the top 20,000 English vocabulary tokens for low-memory browser use. Demonstrates word analogies and cosine similarity. Word vectors & analogies
course-chunks.json AI from scratch course text (ihor.sh) CC0 132 chunks × 64 dimensions Course lesson paragraphs split into semantic chunks and embedded with a compact projection. Used for in-browser cosine retrieval and RAG architectures. Embeddings & retrieval, Evaluating LLMs
llm-eval.json AI from scratch benchmark set (ihor.sh) CC0 20 QA pairs + 18 human labels Target Q&A test prompts and human consensus accuracy labels (1 or 0) used to benchmark automated LLM-as-a-judge scoring metrics and prompt pipelines. Evaluating LLMs
hopper.json US Navy Historical Archives (Photo by Lynn Johnson, 1984) Public Domain (US Gov) 200 × 200 grayscale matrix Digital matrix representation of Rear Admiral Grace Hopper at her computer workstation. Used to demonstrate Singular Value Decomposition (SVD) and low-rank matrix approximation. Singular value decomposition

Scikit-Learn Loaders (Toy & Benchmark Data)

Standard datasets bundled with sklearn.datasets used in early math warm-ups, calculus notebooks, and model benchmarks.

Loader Original Source License Size / Shape Task & Notes Lessons
load_digits() Kaynak & Alpaydin (Bogazici Univ, 1998) BSD 3-Clause 1,797 samples × 64 features (8×8) 10-class handwritten digit recognition. Fast multiclass benchmark that runs in seconds on CPU without network downloads. Probability & loss, Diffusion, SVMs, Serving
load_diabetes() Efron, Hastie, Johnstone & Tibshirani (2004) BSD 3-Clause 442 samples × 10 features Quantitative measure of diabetes disease progression. Clean, zero-centered, unit-variance standardized regression target. Gradients, Multivariable calculus, Systems & inverses
load_breast_cancer() Wolberg, Street & Mangasarian (UW Madison, 1995) CC BY 4.0 569 samples × 30 features Binary classification (malignant vs benign tumors) from cell nuclei characteristics. Used to teach precision, recall, and decision thresholds. A neuron, Measuring a model, Confidence intervals
load_wine() Aeberhard, Coomans & de Vel (1992) CC BY 4.0 178 samples × 13 features Chemical analysis of wines grown in Piedmont, Italy across 3 cultivars. Ideal for PCA projections, mutual information, and SVD. Describing data, Information theory, SVD
fetch_california_housing() Pace & Barry (1997, 1990 US Census) Public Domain 20,640 samples × 8 features Median house values per California census block group. Demonstrates tree depth, gradient boosting splits, and nonlinear feature interactions. Trees & boosting
make_moons()
make_blobs()
Synthetic generator (scikit-learn) BSD 3-Clause Configurable (100–500 points in 2D) Synthetic interlocking crescents and Gaussian blobs. Visualizes non-linear decision boundaries and neural network representations. Matrices are moves, Backprop, Which Model?

Vision, Language & Torch Datasets

External datasets fetched in Google Colab and Kaggle notebooks for computer vision, few-shot learning, and transfer learning.

Dataset Authors / Host License Dimensions Usage & Notes Lessons
OxfordIIITPet Parkhi, Vedaldi, Zisserman, Jawahar (Oxford, 2012) CC BY-SA 4.0 7,349 images across 37 cat & dog breeds Fine-tuning a pretrained ResNet/ConvNeXt vision backbone on transfer learning tasks. Downloaded via torchvision.datasets.OxfordIIITPet. What is ML?, Your first shared model
MNIST LeCun, Cortes, Burges (1998) CC BY-SA 3.0 70,000 grayscale 28×28 digits Foundational convolutional neural network architecture training: convolutions, pooling, flattening, and backpropagation in PyTorch. Convolutions, Training in PyTorch
Omniglot B. M. Lake, R. Salakhutdinov, J. B. Tenenbaum (2015) MIT 1,623 character classes from 50 alphabets Few-shot character verification, triplet loss distance learning, and Siamese feature embeddings. Loaded via torchvision.datasets.Omniglot. Faces & style

License & Usage Notes

Permissive Educational Use: All datasets included in ai/data/ are either Public Domain (NYC Open Data, MTA, US Government) or licensed under permissive Creative Commons attribution terms (CC BY 4.0 / CC0). When reproducing experiments in external publications, cite the original authors listed above.

Last updated