Implement P_EI sampling