Visualizing the Mathematics Behind Machine Learning.
Learn the mathematics behind natural language processing through worked examples, interactive visualizations, and small models you can run in your browser.
Work through the steps behind each formula and check them against a concrete example.
Drag points, adjust sliders, and train small models to see how the calculations respond.
Use the quizzes to check your understanding. Each option includes feedback to help you work through the answer.
From counting words to training transformers: probability, gradients, embeddings, attention, and the models built on them.
Alignment, retrieval, translation, recurrent architectures, and speech: topics that build on the core language-model material but stand on their own.
Computational Linguistics
is being built.
This volume will cover how computers analyze language structure and meaning, from tagging words and parsing sentences to tracking references across a passage. Lessons and interactive examples are still in development.
About
this project
MathCore is a guide to the mathematics behind natural language processing and machine learning. The lessons pair explanations with interactive visualizations and small, runnable models, so you can try an idea as you learn it.
Train a small neural network, move a decision boundary, or generate text one token at a time. The derivations explain how the calculations work; the demos let you change the inputs and see what follows.
I built MathCore to make this material easier to study independently. You can work through the lessons in order or explore a topic that interests you. The range of topics draws on Speech and Language Processing by Daniel Jurafsky and James H. Martin; the explanations and interactive examples were developed for this site.
MathCore in the classroom
Learning together
Snapshots from my teaching sessions at V.R.V. Matriculation High School, bringing n-gram models, vocabulary growth, and other machine learning concepts into the classroom.
2025
Tokenization, words and tokens, and minimum edit distance algorithms
2026
N-gram models, interpolation, gradient descent, and neural networks