Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

em算法实现的一个错误 #42

Open
Ga091an opened this issue Jun 9, 2020 · 4 comments
Open

em算法实现的一个错误 #42

Ga091an opened this issue Jun 9, 2020 · 4 comments

Comments

@Ga091an
Copy link

Ga091an commented Jun 9, 2020

def pmf(i, pro_A, pro_B, por_C):
    pro_1 = pro_A * math.pow(pro_B, data[i]) * math.pow(
        (1 - pro_B), 1 - data[i])
    pro_2 = pro_A* math.pow(pro_C, data[i]) * math.pow(
        (1 - pro_C), 1 - data[i])
    return pro_1 / (pro_1 + pro_2)

第四行是不是应该改成
pro_2 = (1-pro_A)* math.pow(pro_C, data[i]) * math.pow(
(1 - pro_C), 1 - data[i])

@LIUJAING
Copy link

应该是

@nicholaslsq
Copy link

nicholaslsq commented Dec 17, 2021 via email

@cyy0214
Copy link

cyy0214 commented Dec 17, 2021 via email

@daibitao19
Copy link

daibitao19 commented Dec 17, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants