0368-3248-01

Algorithms in Data Mining (0368-3248-01, Tel Aviv University, Fall 2011–2013)

Algorithms in Data Mining
0368-3248-01 · Fall 2011, 2012 & 2013 · Tel Aviv University

Class Description

Data Mining is concerned with efficiently extracting statistics, patterns, structures, or meanings from raw data. This task becomes challenging when the volume of data is massive, as is standard in modern datasets. This course surveys foundational algorithms, mathematical concepts, and data structures for analyzing large-scale datasets, with a particular emphasis on randomization and the streaming model — where items (integers, strings, documents, sets, or matrix entries) arrive one at a time and must be processed under severe space limitations.

Topics covered include data sampling and reservoir sampling, finding frequent items and itemsets in data streams, Bloom filters and sketches, counting distinct elements and general frequency moment estimation, random projections and the Fast Johnson-Lindenstrauss Transform (FJLT), Singular Value Decomposition (SVD), matrix sampling and deterministic matrix sketching (Frequent Directions), k-means clustering, spectral graph theory, and exact and approximate nearest neighbor search (Locality Sensitive Hashing) in high dimensions.

The lecture notes present algorithms in their most basic form for didactic clarity. Correctness proofs are designed to be as simple and self-contained as possible, each presentable in roughly one long frontal session. An advanced undergraduate or graduate student with experience in probability, linear algebra, algorithms, and combinatorics should be able to follow the course. The class is devoted to ideas, algorithms, and proofs — as one student memorably noted in course feedback: “you think you’re going to get an interesting course and you end up getting a load of math.”

Syllabus & Class Notes

Below is the complete curriculum organized by lecture topic, linking to the primary Fall 2013 lecture notes alongside earlier editions from Fall 2012 and Fall 2011.

  • Lecture 1 — Probability Recap (PDF) & Mark and Recapture (PDF) [2012 Recap · 2012 M&R · 2011 Prelim · 2011 M&R]

    • Discrete and continuous random variables, probability distributions, and expectation.
    • Conditional expectation, dependence vs. independence, linearity of expectation, and additivity of variance.
    • Markov’s inequality and Chebyshev’s inequality.
    • Mark and recapture: estimating population size n from two independent samples of size k via collision counts and linearity of expectation.
  • Lecture 2 — Probabilistic Inequalities (PDF) & Sampling from Streams (PDF) [2012 Chernoff · 2012 Sampling · 2011 Sampling]

    • Chernoff’s bound: full proof via exponential moment generating functions and multiplicative forms for sums of independent Bernoulli trials.
    • Subset size estimation via uniform random sampling and sample complexity bounds.
    • The union bound: simultaneous accuracy guarantees across m subsets with only logarithmic overhead.
    • Uniform sampling from streams of unknown length, Fisher–Yates shuffling, and Reservoir Sampling.
  • Lecture 3 — Item Frequency Estimation in Streams (PDF) [2012 Notes · 2011 Count Sketches · 2011 Bloom Filters]

    • The heavy hitters and item frequency estimation problem in data streams using sublinear o(n) memory.
    • Count-Min Sketch (Cormode & Muthukrishnan; Manku & Motwani): reducing space dependence on ε from O(1/ε²) to O(log(n/δ)/ε).
    • Deterministic Frequent Items / Lossy Counting (Misra & Gries; Demaine et al.; Karp, Papadimitriou & Shenker): O(1/ε) space and O(1) amortized update time.
    • Count Sketch (Charikar, Chen & Farach-Colton): random sign hashes and median-of-buckets aggregation for ℓ2 residual tail guarantees.
    • Bit-hashes vs. Bloom filters (2011 Notes): reducing space from O(n/δ) to O(n log(1/δ)) bits using k = O(log(1/δ)) hash functions.
    • Frequent itemsets in market-basket data (2011 Agenda · Dynamic Itemset Counting): Apriori, prefix tries, and DIC.
  • Lecture 4 — Frequency Moment Estimation in Streams (PDF) [2012 Notes · 2011 Notes]

    • Frequency moments fk = ∑i nik: distinct elements (f0), stream length (f1), and repeat rate / skew (f2).
    • Estimating f0 (distinct elements) via minimum hash values (Alon, Matias & Szegedy; Cohen).
    • Estimating general frequency moments fk (k > 0) via the AMS estimator X = N(rk − (r−1)k).
    • Estimating the second moment f2 in O(1/(ε²δ)) space via random ±1 projections (Tug-of-War sketch) and its connection to norm-preserving random projections.
  • Lecture 5 — Random Projection & The Johnson-Lindenstrauss Lemma (PDF) [2012 Notes · 2011 Notes]

    • Metric distortion and dimensionality reduction for pairwise Euclidean distances.
    • The Johnson-Lindenstrauss Lemma: embedding n points into k = O(log(n)/ε²) dimensions with (1 ± ε) distortion.
    • Random projections via matrices with independent normally distributed (Gaussian) entries and sub-Gaussian tail bounds.
  • Lecture 6 — Fast Random Projection (FJLT) (PDF) [2012 Notes (Sec. 3–5)]

    • Accelerating Johnson-Lindenstrauss projections from O(kd) to O(d log d) time (Ailon & Chazelle; Ailon & Liberty).
    • Fast vector ℓ4-norm reduction (vector spreading) via randomized Walsh–Hadamard transforms and Khintchine’s inequality.
    • Importance sampling and sparse random projections on vectors with bounded ℓ4 norm (‖x‖4 = O(d−1/4)).
  • Lecture 7 — Singular Value Decomposition (SVD) & PCA (PDF) [2012 Notes · 2011 SVD · 2011 Power Method]

    • Geometry, existence proof, and fundamental properties of the Singular Value Decomposition A = UΣVT.
    • Eckart–Young–Mirsky Theorem: optimal rank-k matrix approximation in both the spectral norm and Frobenius norm.
    • Data mining applications: least-squares linear regression (pseudo-inverse), Principal Component Analysis (PCA), and closest orthogonal matrix.
    • Computing the SVD of large matrices via the Power Method (simultaneous iteration).
  • Lecture 8 — Matrix Sampling and Rank-k Approximation (PDF) [2012 Notes · 2011 Ahlswede–Winter Notes]

    • Accelerating eigenvector and SVD computation by sparsifying dense matrices.
    • Element-wise matrix sampling: picking entries with probability proportional to squared magnitude (Arora, Hazan & Kale; Drineas & Zouzias).
    • Matrix concentration inequalities: the Matrix Bernstein / Chernoff bound and the Ahlswede–Winter inequality.
  • Lecture 9 — Matrix Approximation Continued: Column Sampling & Deterministic Matrix Sketching (PDF)

    • PCA with an approximate covariance matrix and additive-error rank-k bounds.
    • Column subset selection by row/column norm-squared sampling (Drineas & Kannan; Rudelson & Vershynin; Boutsidis, Drineas & Magdon-Ismail).
    • Deterministic Matrix Sketching / Frequent Directions (Liberty, 2012): streaming matrix covariance approximation analogous to the Misra–Gries frequent items algorithm.
  • Lecture 10 — k-Means Clustering (PDF) [2012 Notes]

    • The k-means clustering objective (sum of squared Euclidean distances) and Lloyd’s iterative algorithm.
    • Connection between k-means and PCA: spectral relaxation of cluster indicator matrices (Zha et al.; Ding & He) and 2-approximation via rank-k SVD projection.
    • ε-net argument for k-means in fixed low dimensions.
    • Sampling-based seeding, coresets, and k-means++ (Arthur & Vassilvitskii).
  • Lecture 11 — Nearest Neighbor Search and the Curse of Dimensionality (PDF) [2012 Notes]

    • Exact and (1 + ε)-approximate nearest neighbor search problem formulations.
    • Space-partitioning data structures: k-d trees (Bentley, 1975), construction, and range/nearest-neighbor query traversal.
    • The Curse of Dimensionality: why k-d trees inspect Ω(2d) cells in high dimensions, concentration of volume near the boundary of high-dimensional balls and cubes, and near-orthogonality of random vectors.
  • Lecture 12 — Approximate Nearest Neighbor Search & Locality Sensitive Hashing (PDF) [2012 Notes · 2011 Notes]

    • Reduction from Approximate Nearest Neighbor Search to the (c, r)-Approximate Near Neighbor decision problem.
    • Locality Sensitive Hashing (LSH) families (Gionis, Indyk & Motwani): amplifying collision probability gaps via concatenation and multiple hash tables in O(nρ) query time, where ρ = log(p1)/log(p2).
    • LSH constructions: bit sampling on the Hamming cube {0,1}d with ρ = 1/c, similarity search, and random hyperplane rounding (SimHash, Charikar) on the unit sphere Sd−1.
  • Additional Topics (2011 & 2012 Editions) — Spectral Graph Theory (PDF), Tree Metric Embeddings (PDF) & Partial Match (PDF)

Course Editions & Materials Matrix (2011–2013)

Below is a side-by-side index of all lecture notes, home assignments, and exams across the three academic years taught at Tel Aviv University.

Home Assignments & Exams

Self-contained problem sets and final examinations (Moed Alef and Moed Beit) with full worked solutions:

Home Assignments

  • Fall 2013, Assignment 1 — Problems (PDF) • Solutions (PDF)

    • Probabilistic inequalities, approximating the size of a graph via neighborhood sampling, streaming approximate median, and simple high-capacity hashing.
  • Fall 2013, Assignment 2 — Problems (PDF) • Solutions (PDF)

    • Randomized meta-algorithms (amplifying success probability via median-of-means), set intersections in streams, weak random projections, and SVD via the power method.
  • Fall 2012, Assignment 1 — Problems (PDF) • Solutions (PDF)

    • Approximating the size of a tree via random root-to-leaf walks and streaming approximate histograms.
  • Fall 2012, Assignment 2 — Problems (PDF) • Solutions (PDF)

    • Weak random projections and constant-factor norm preservation.
  • Fall 2012, Assignment 3 — Problems (PDF)

    • Randomized meta-algorithms and spectral norm approximation via the power method.

Final Examinations (Moed Alef & Moed Beit)

  • Fall 2013, Exam Alef — Exam (PDF)

    • Probabilistic inequalities, approximate item frequencies in streams, approximate median, and k-means clustering with equal cluster sizes.
  • Fall 2012, Exam Alef — Exam (PDF) • Solutions (PDF)

    • Probabilistic inequalities, Monte Carlo integration of black-box functions, matrix sampling, and 2-means clustering.
  • Fall 2012, Exam Beit — Exam (PDF) • Solutions (PDF)

    • Probabilistic inequalities, estimating the number of stars in the sky, estimating the number of users on Facebook via random walks, and simple high-capacity hashing.
  • Fall 2011, Exam Alef — Exam (PDF) • Solutions (PDF)

  • Fall 2011, Exam Beit — Exam (PDF) • Solutions (PDF)

Grading & Student Projects

Course evaluation is structured differently for undergraduate and graduate students:

  • Undergraduate Students: Home assignments (50% of the grade) and a Final Exam (50% of the grade). An optional final project is available for extra credit.

  • Master’s & PhD Students: Home assignments (50% of the grade) and a Final Project (50% of the grade; in Fall 2013, graduate students could elect either the Final Exam or the Final Project).

Final Project Guidelines

  • Scope & Effort: Projects can contain both theoretical and experimental elements and should require roughly one to two weeks of dedicated work — comparable to studying for and taking the final exam.

  • Deliverable: A single self-contained PDF report covering project motivation, background literature, dataset review, mathematical derivations, experimental results, pseudocode, and discussion.

Selected Literature

Foundational papers in streaming algorithms, sketching, random projections, randomized numerical linear algebra, clustering, and high-dimensional similarity search cited in the lecture notes:

Contribute & Open Course Materials

All class notes, assignments, and exams are intended to be used freely by academics anywhere, students and professors alike. Contributions and corrections are highly encouraged in the form of pull requests or issues on GitHub.

On Unix-like systems (e.g., macOS or Linux) with bibtex and pdflatex available, you can compile all LaTeX lecture notes directly from source:

git clone https://github.com/edoliberty/algorithms-in-data-mining.git
cd algorithms-in-data-mining
./build.sh

Related Classes