1 | // likelihood = P(E | H) |
2 | // prior = P(H) |
3 | // modelEvidence = P(E) |
4 | // returns P(H | E) |
5 | static double bayes(double likelihood, double prior, double modelEvidence) { |
6 | ret likelihood*prior/modelEvidence; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026375 |
Snippet name: | bayes |
Eternal ID of this version: | #1026375/1 |
Text MD5: | 4270911dbe2aab6e9e1031520056114d |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-12-29 21:49:11 |
Source code size: | 207 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 208 / 239 |
Referenced in: | [show references] |