add cal train random kernel function