Description Usage Arguments Value Note Author(s) Examples
Convert bn.fit
objects to grain
objects and vice versa.
1 2 3 4 |
x |
an object of class |
An object of class grain
(for as.grain
) or bn.fit
(for as.bn.fit
).
Conditional probability tables in grain
objects must be completely
specified; on the other hand, bn.fit
allows NaN
values for
unobserved parents' configurations. Such bn.fit
objects will be
converted to grain
objects by replacing the missing conditional
probability distributions with uniform distributions.
Another solution to this problem is to fit another bn.fit
with
method = "bayes"
and a low iss
value, using the same data
and network structure.
Marco Scutari
1 2 3 4 5 6 | ## Not run:
library(gRain)
a = bn.fit(hc(learning.test), learning.test)
b = as.grain(a)
c = as.bn.fit(b)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.