estimate MMD