Coding the Matrix Resources
This page links to resources for Coding
the Matrix. The links are organized by chapter and section; as a
consequence, there might be multiple links to the same resource.
Please do not make these materials publicly available elsewhere,
and do not make your solutions public. Don't deprive
others of the pleasure and challenge of solving the problems, and
don't place temptation in the path of others.
The Function (and other mathematical and computational preliminaries)
- Lab: Python—modules and control structures—and inverse index
The Field
- Playing with ℂ
- Playing with GF(2)
The Vector
- Dictionary-based representations of vectors
- Our implementation of Vec
- Solving a triangular system of linear equations
- Lab: Comparing voting records using dot-product
- Problems
- vec.py The tests formerly located in test_mat.py have been added to this file as doctests.
- test_vec.py This file is not needed since its doctests have been added to vec.py.
The Vector Space
The Matrix
- What is a matrix?
- Matrix-vector and vector-matrix multiplication in terms of linear combinations
- Lab: Error-correcting codes
- Lab: Transformations in 2D geometry
- Problems
- mat.py The tests formerly located in test_mat.py have been added to this file as doctest.
- mat_sparsity.py This file contains some
simple doctests that should take very little time if your implementations of transpose, matrix-vector multiplication, vector-matrix multiplication, and matrix-matrix multiplication exploit sparsity.
- UN_voting_data.txt
The Basis
- Perspective rendering
- Lab: Perspective rectification
- Problems
Dimension
- Dimension and rank
- The annihilator
- Problems
Gaussian elimination
- Gaussian elimination over GF(2)
- Using Gaussian elimination for other problems
- Lab: Threshold Secret-Sharing
- Lab: Factoring integers
The Inner Product
- Orthogonality
- Lab: machine learning
The following .data files were derived from data obtained from the
University of Wisconsin Hospitals, Madison from Dr. William H. Wolberg.
- train.data File with data on which to train your classifier
- validate.data File with data on which to test your classifier
- cancer_data.py The procedure returns a pair
(A, b) consisting of a P-by-D matrix A and a P-vector b where P is
a set of patient IDs. This differs slightly from the spec given in
this chapter of Edition 0.
Orthogonalization
- Projection orthogonal to multiple vectors
- Problems
Special Bases
- Discrete Fourier transform
- Lab: Using wavelets for compression
The Singular Value Decomposition
- Closest dimension-k vector space
- Lab: Digits
- Lab: Eigenfaces
The Eigenvector
The Linear Program
- The simplex algorithm
- Lab: Learning through linear programming
- train.data File with data on which to train your classifier
- validate.data File with data on which to test your classifier
- cancer_data.py The procedure returns a pair
(A, b) consisting of a P-by-D matrix A and a P-vector b where P is
a set of patient IDs. This differs slightly from the spec given in
this chapter of Editions 0 and 1.