The k-nearest neighbors digit classifier