AIMA 实施贝叶斯网络
我想用java编写贝叶斯网络以更好地理解它们,并且我找到了人工智能现代方法(第三版),“AIMA”的一些代码,
您是否建议我阅读那里的代码并适应特定问题,或者我该如何开始? 您能告诉我如何使用该代码吗?
I would like to code bayesian networks in java to understand them better, and I have found some code of Artificial Intelligence A Modern Approach (3rd Edition), "AIMA"
Do you recommend I read the code there and adapt to a particular problem, or how do I start?
Could you please orient me where in how to use the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说,如果你想学习,就不需要查看现有代码。通过亲自实践,您可能会学到更多。
一个好的开始是编写执行以下操作的代码:
从联合概率表计算条件概率,
例如,从 P(A,B,C) 计算 P(A|B)
根据完整的条件概率集计算联合概率表
例如,根据 P(A|B,C)*P(B)*P(C) 计算 P(A,B,C)。
给定一个 DAG,计算 A 是否与 B d 分离
简单地执行上述所有操作,然后返回并尝试提高它们的效率。
它应该让您很好地理解贝叶斯网络是什么(条件概率表)以及它们的用途(概率推理)。
I would say there is no need to look at existing code if you want to learn. You will probably learn more by doing it yourself.
A good start would be to write code that does the following:
Compute Condition Probabilities from Joint Probability table,
For example, from P(A,B,C) compute P(A|B)
Compute Joint Probability Table from complete set of Conditional Probabilities
For example, from P(A|B,C)*P(B)*P(C) compute P(A,B,C).
Given a DAG, compute if A is d-seperated from B
Do all of the above naively and then go back and try to make them efficient.
It should give you a good understanding of what Bayesian Networks are (conditional probability tables) and what they are used for (reasoning about probability).