Sha256: 17dd28e08b911309d69452b3893fd8f52e2472e7c974cf246a19222b7c0e39fc
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>p_v_cond_parents (BayesNet)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/bn4r/bn.rb, line 130</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">p_v_cond_parents</span>(<span class="ruby-identifier">v</span>) <span class="ruby-identifier">givens_assignments</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">parents</span><span class="ruby-operator">|</span> <span class="ruby-identifier">parents</span>.<span class="ruby-identifier">value</span>} <span class="ruby-identifier">v</span>.<span class="ruby-identifier">get_probability</span>(<span class="ruby-identifier">v</span>.<span class="ruby-identifier">value</span>, <span class="ruby-identifier">givens_assignments</span>).<span class="ruby-identifier">to_f</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bn4r-0.9.0 | doc/classes/BayesNet.src/M000019.html |