modified calker_cal_train_random_kernel to support rand num