Skip to content
JohnLangford edited this page Feb 1, 2026 · 2 revisions

Examples and Demos

Vowpal Wabbit includes example code and demos in several locations across the repository and in companion repos. This page provides an index of all known example locations.

External Resources

Location Description
VW Jupyter Notebooks Standalone Jupyter notebooks covering contextual bandits, classification, Slates, and CATS. Can be run via Binder.
VW Website Tutorials (source) Curated tutorials on the official website: getting started, CB simulation, off-policy evaluation, Slates, Python first steps, and more.

Command-Line Demos (demo/)

Getting Started

Directory Description
cmd_getting_started/ Interactive Jupyter notebook introduction to VW

Classification

Directory Description
dbpedia/ Multi-class classification on DBpedia ontology categories
mnist/ Handwritten digit recognition with various neural network configurations
ocr/ Optical character recognition

Contextual Bandits

Directory Description
cats/ Contextual bandits with continuous actions (CATS)
advertising/ Ad serving simulation

Search / Structured Prediction

Directory Description
entityrelation/ Entity-relation extraction using the Search subsystem
dependencyparsing/ Dependency parser using the Search subsystem

Tree-Based Methods

Directory Description
memory_tree/ Memory tree reduction for nearest-neighbor classification
recall_tree/ Logarithmic-time multiclass prediction with recall trees
plt/ Probabilistic Label Trees for extreme multi-label classification

Recommendation / Matrix Factorization

Directory Description
movielens/ Low-rank collaborative filtering on the MovieLens dataset

Neural Networks / Feature Engineering

Directory Description
dna/ Splice-site recognition with neural networks and parallel training
normalized/ Comparison of normalized vs. unnormalized learning rules across datasets
random-noise/ Signal separation from noise

Performance Analysis

Directory Description
performance/ Performance measurement and benchmarking
File Description
cmd_first_steps.md First steps with VW from the command line
cmd_linear_regression.md Linear regression walkthrough
cmd_csv_with_iris_dataset.md CSV input with the Iris dataset
off_policy_evaluation.md Off-policy evaluation for contextual bandits

Python Notebook Examples (python/docs/source/examples/)

Jupyter notebooks covering contextual bandits, classification, the Search subsystem, and the Python API.

Other Language Examples

Location Description
c_test/sample.c C API usage example
java/ Java bindings with examples
cs/examples/simulator/ C# contextual bandit simulator

Wiki Examples

The wiki also has several worked examples:

Clone this wiki locally