1. A method to generate a codebook for channel state information, comprising: a. generating a random codebook; b. partitioning channel state information into a set of nearest neighbors for each codebook entry based on a distance metric; and c. updating the codebook by finding a centroid for each partition.