gpt4 book ai didi

statistics - 机器学习-分类算法

转载 作者:行者123 更新时间:2023-11-30 09:38:45 26 4
gpt4 key购买 nike

我想找到以下概率:

P(y=1/n=k; thetha) 

读作:

Probability, The prediction is class 1 given number of words = k, parametrized by thetha

传统分类没有条件概率(右)

P(y = 1; thetha) 

如何解决这个问题?

编辑:

例如,假设我想根据附件的数量来预测电子邮件是否是垃圾邮件。令 y=1 表示垃圾邮件,y=0 表示非垃圾邮件。

所以,

P(y = 1/num_attachements=0; some attributes)
and so on!!

这有意义吗?

最佳答案

通常附件数量只是另一个属性,因此您的概率与

P(y = 1 | all attributes)

但是,如果您对附件有一些特殊处理(例如,其他属性是数字而附件是 bool 值),您可以单独计算它们,然后组合为:

P(C|A, B) = P(C|A) * P(C|B) / P(C)

其中 C 代表事件 y = 1A - 代表附件,B 代表其他属性。

参见this paper有关几个 Nave Bayes 分类器的描述。

关于statistics - 机器学习-分类算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9423129/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com