computing kernel for prior prediction