1.6. Summary and further resources#
Specific learning goals for this chapter
Be familiar with basic vector and matrix algebra, in particular how to compute inner products and Euclidean norms and the different perspectives on matrix-matrix products (inner products vs. linear combinations).
Define and compute the Frobenius norm of a matrix.
Be familiar with the basics of optimization theory, in particular how to define and recognize graphically global optima and local optima, and state and check the first-order optimality condition.
Write down the k-means objective function in different forms (in terms of clusters, in terms of assignments, in matrix form). Compute it on small examples.
In k-means clustering, compute the optimal representatives given fixed clusters and, vice versa, compute the optimal cluster assignments given fixed representatives. Justify rigorously these formulas.
Convert the input and output of the k-means clustering problem between the different forms (vectors-matrices, partition-assignment).
State Lloyd’s algorithm for solving the k-means clustering problem.
Describe how input vectors can be centered and normalized. Compute a standardized input on a small example.
Just the code
An interactive Jupyter notebook featuring the code in this chapter can be accessed below (Google Colab recommended). It is also available as a slideshow.
Auto-quizzes
Automatically generated quizzes for this chapter can be accessed here (Google Colab recommended):