preliminary implementation of learning primitive kernels.