Functions in gRain

Functions in gRain to be used in the future.

extract_cpt() extract_pot() extract_marg() marg2pot() pot2marg()

Extract conditional probabilities and clique potentials from data.

compile_cpt() compile_pot() parse_cpt()

Compile conditional probability tables / cliques potentials.

cpt() cptable()

Create conditional probability tables (CPTs)

example_chest example_chest_cpt

Chest clinic example

example_grass example_grass_cpt

Wet grass example

nodeNames() nodeStates() universe() isCompiled() isPropagated() vpar(<cpt_spec>) vpar(<cpt_grain>) rip(<grain>)

gRain generics

grain()

Create Bayesian network

simulate(<grain>)

Simulate from Bayesian network

compile(<grain>)

Compile Bayesian network.

evidence_add() evidence_get() evidence_drop() evidence_prob()

Set, update and remove evidence.

predict(<grain>)

Make predictions from Bayesian network

propagate(<grain>) propagateLS()

Propagate in a Bayesian network

loadHuginNet() saveHuginNet()

Load and save Hugin net files

booltab() andtab() ortab() andtable() ortable()

Conditional probability tables based on logical dependencies

mendel()

Mendelian segregation

querygrain()

Query a Bayesian network

repeat_pattern()

Create repeated patterns in Bayesian networks

replace_cpt()

Replace CPTs in Bayesian network

simplify_query()

Simplify output query to a Bayesian network

Old names

These functions are kept in the package for backward compatibility. They may be deprecated in the future.

setFinding()

Set, retrieve, and retract finding in Bayesian network.

extractCPT() extractPOT() extractMARG()

Extract conditional probabilities and clique potentials from data.

compileCPT() compilePOT()

Compile conditional probability tables / cliques potentials.

setEvidence() retractEvidence() absorbEvidence() getEvidence() pEvidence()

Set, update and remove evidence.

repeatPattern()

Create repeated patterns in Bayesian networks