add func to bayes

Signed-off-by: changedi <jysoftware@gmail.com>