Codebooks For Machine Learning Algorithms