Artificial Intelligence in Data Science

The closing unit of the Data Science collection, an overview of the wider field that data science feeds into. The history from Turing's imitation game and the Dartmouth proposal through two AI winters to deep learning; machine learning with Sutton and Barto's 10-armed bandit; computer vision with convolution worked by hand and a one-pixel shift experiment; language with word vectors from the Brown corpus; risks and fairness on census income data with Chouldechova's identity; generative models and scaling laws; and prompting with temperature and nucleus sampling. Each article ends with worked problems and open questions, and routes to the deeper pages of the library.

A closing unit on the wider field that data science feeds into. Its articles are overviews: each works the central idea of one area on a small example, measures what it can with a seeded experiment, and routes to the pages of the library that treat the subject in depth. Almost every method of the earlier units is part of artificial intelligence in the broad sense, and this unit places them in that field.

Order. The introduction comes first, because it sets out what the name has meant and how the field's history alternated between promise and disappointment. Machine learning follows as the method behind most of the rest. Vision and language are the two large application areas, each with its own representation of the data. The risks article comes next, before the two articles on language models, because the questions it raises (fairness, reliability, privacy, misuse) apply to every system in the unit. Generative models and prompting close the unit.

Running data. Each article works its own example, chosen so that every number can be recomputed. The handwritten digits shipped with scikit-learn (1,797 images of 8 by 8 pixels) serve both the vision article and the generative article. The Brown corpus, about a million words of edited American English, supplies the word vectors. The 1994 census income extract known as the Adult data supplies the fairness example. Sutton and Barto's 10-armed testbed supplies the reinforcement learning example, and one invented next-token distribution the sampling example.

What is proved, shown and cited. Proved on the pages: Chouldechova's identity between error rates and base rates, the optimal discriminator and Jensen–Shannon value of the adversarial game, the monotone effect of temperature on entropy, the variance of a dot product that motivates scaled attention, the equivariance of convolution away from the border, the expected best arm of the bandit, and the lower bound on the leaves any correct game-tree search must examine (that best-first alpha-beta attains it is cited to Knuth and Moore and checked by the script). Shown by the scripts in tools/experiments/data-science/: every measured number, from the shift experiments to the group rates of the census classifier. Cited: the historical record, published benchmark results, and every statement about a named model or product, dated to its source.

Articles

  • Introduction to Artificial Intelligence: what the name has meant, from Turing's imitation game and the Dartmouth proposal to McCarthy's definition; rules against learning; the history from Lighthill's report to AlexNet and the transformer; worked problems on the number of games a test of Turing's 70% forecast needs (119 to detect a true rate of 80%) and on how far alpha-beta pruning tames the combinatorial explosion.
  • Machine Learning: models, parameters and loss; the supervised, unsupervised and reinforcement settings; generalization; the 10-armed bandit, where the greedy agent finds the best arm in about a third of problems; worked problems deriving the best possible reward, 1.5388, and showing the cautious explorer overtaking after about 1,500 steps.
  • Computer Vision: images as arrays; convolution worked by hand on a handwritten 7 with ReLU and max pooling; convolutional networks from LeNet-5 to AlexNet; what ImageNet measured; a one-pixel shift that costs logistic regression 54 points of accuracy and a small convolutional network 37; shortcuts and unequal error rates; worked problems proving equivariance, showing why pooling is only partly invariant, and measuring what training on shifted copies recovers.
  • Natural Language Processing: bags of words and the synonym problem; word vectors computed from the Brown corpus, with their antonym problem and a failed analogy; word2vec; attention and the transformer; evaluation; worked problems on TF-IDF, on why attention divides by $\sqrt{d_k}$, and on Levy and Goldberg's shift.
  • Risks and Ethics in AI: a map of risks after Weidinger et al.; a census income classifier with nearly equal precision for women and men and false positive rates of 0.02 and 0.10, explained by Chouldechova's identity; proxies; hallucination, privacy, misuse, documentation, environmental and labor costs; the EU AI Act and its 2026 amendment; worked problems deriving the identity and showing what equalizing one error rate does to the others.
  • Generative AI: generative against discriminative models on handwritten digits; autoencoders, adversarial networks and diffusion; autoregressive language models; Kaplan's scaling law and the Chinchilla revision; worked problems on the optimal discriminator, the number of principal components, and Gopher against Chinchilla under both scaling laws.
  • Prompt Engineering: few-shot prompting and the biases of examples; chain of thought and its limits; structured output; temperature and nucleus sampling worked on one distribution; prompt injection; evaluating a prompt like a model; worked problems on temperature and entropy, the adaptive nucleus, and the number of test cases a comparison of two prompts needs.

Where the site goes deeper

Several collections of the library take these overviews further. The Information Retrieval collection treats text in depth: Word Embeddings proves the factorization behind word2vec, Text Embeddings and Dense Retrieval moves to passages, Retrieval-Augmented Generation gives a model the documents it should rely on, and Knowledge Stores and Memory covers what an assistant can store and recall. Language Models from Scratch builds a small GPT step by step, from a bigram model to attention and the full transformer. The Statistics collection supplies the theory beneath the evaluations: Statistics of Model Evaluation for comparing models and prompts, Statistical Learning Theory for generalization, and Information Theory for entropy, cross-entropy and the loss of a language model. The evolutionary computing course's Neuroevolution trains networks without gradients. The library's Anthropic Research collection holds reading notes on research into large language models: interpretability, written principles and constitutions, evaluations, scaling, honesty and sycophancy, and the risks the ethics article maps.

Several subjects these pages introduce would support collections of their own later: deep learning (training methods, convolutional and recurrent architectures, deep generative models), reinforcement learning beyond the bandit, responsible machine learning (fairness criteria, privacy, explanation methods, distribution shift), and classical AI (search, planning and logic).

References

Each article lists its own references. The sources the unit draws on throughout: record · 4 pages

  • James, G., Witten, D., Hastie, T., and Tibshirani, R. (2021). An Introduction to Statistical Learning with Applications in R (2nd ed.). Springer. Chapters 2, 4 and 10. record · 39 pages
  • Russell, S., and Norvig, P. (2020). Artificial Intelligence: A Modern Approach (4th ed.). Pearson. record · 6 pages
  • Sutton, R. S., and Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd ed.). MIT Press. record · 2 pages
  • Turing, A. M. (1950). Computing machinery and intelligence. Mind, 59(236), 433–460. record · 3 pages
  • Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems 30. arXiv:1706.03762. record · 9 pages