def train_subquantizers(data, num_buckets, subquantizer_clusters=256, kmeans_local_iters=20, n_init=10, random_state=None):

    subquantizers = list()
    for i, d in enumerate(np.split(data, num_buckets, axis=1)):
        model = KMeans(n_clusters=subquantizer_clusters, init="k-means++", max_iter=kmeans_local_iters,
                       n_init=n_init, n_jobs=1, verbose=False, random_state=random_state)
        model.fit(d)
        subquantizers.append(model.cluster_centers_)
        logger.info('Fit subquantizer %d of %d.' % (i + 1, num_buckets))

    return subquantizers
List all of the user's preferences.
dataset/ETHPy150Open yahoo/lopq/python/lopq/model.py/train_subquantizers--crossover with--dataset/ETHPy150Open ducksboard/libsaas/libsaas/services/desk/users.py/User.preferences