# Dynamic Bayesian Network Learning and Inference

## Documentation for package ‘dbnR’ version 0.5.3

- DESCRIPTION file.

## Help Pages

acc_successions | Returns a vector with the number of consecutive nodes in each level
add_attr_to_fit | Adds the mu vector and sigma matrix as attributes to the bn.fit or dbn.fit object
approximate_inference | Performs approximate inference forecasting with the GDBN over a data set
approx_prediction_step | Performs approximate inference in a time slice of the dbn
calc_mu | Calculate the mu vector of means of a Gaussian linear network. Front end of a C++ function.
calc_mu_cpp | Calculate the mu vector of means of a Gaussian linear network. This is the C++ backend of the function.
calc_sigma | Calculate the sigma covariance matrix of a Gaussian linear network. Front end of a C++ function.
calc_sigma_cpp | Calculate the sigma covariance matrix of a Gaussian linear network. This is the C++ backend of the function.
Causlist | This file contains all the classes needed for the PSOHO structure learning algorithm. It was implemented as an independent package in https://github.com/dkesada/PSOHO and then merged into dbnR. All the original source files are merged into one to avoid bloating the R/ folder of the package.
check_time0_formatted | Checks if the vector of names are time formatted to t0
cl_to_arc_matrix_cpp | Create a matrix with the arcs defined in a causlist object
create_blacklist | Creates the blacklist of arcs from a folded data.table
create_causlist_cpp | Create a causal list from a DBN. This is the C++ backend of the function.
cte_times_vel_cpp | Multiply a Velocity by a constant real number
dmmhc | Learns the structure of a markovian n DBN model from data
dynamic_ordering | Gets the ordering of a single time slice in a DBN
exact_inference | Performs exact inference forecasting with the GDBN over a data set
exact_prediction_step | Performs exact inference in a time slice of the dbn
expand_time_nodes | Extends the names of the nodes in t_0 to t_(max-1)
fit_dbn_params | Fits a markovian n DBN model
fold_dt | Widens the dataset to take into account the t previous time slices
fold_dt_rec | Widens the dataset to take into account the t previous time slices
forecast_ts | Performs forecasting with the GDBN over a data set
initialize_cl_cpp | Create a causality list and initialize it
init_list_cpp | Initialize the particles
learn_dbn_struc | Learns the structure of a markovian n DBN model from data
merge_nets | Merges and replicates the arcs in the static BN into all the time-slices in the DBN
motor | Multivariate time series dataset on the temperature of an electric motor
mvn_inference | Performs inference over a multivariate normal distribution
node_levels | Defines a level for every node in the net
Particle | R6 class that defines a Particle in the PSO algorithm
plot_dynamic_network | Plots a dynamic Bayesian network in a hierarchical way
plot_network | Plots a Bayesian networks in a hierarchical way
Position | R6 class that defines DBNs as causality lists
pos_minus_pos_cpp | Substracts two Positions to obtain the Velocity that transforms one into the other
pos_plus_vel_cpp | Add a velocity to a position
predict_bn | Performs inference over a fitted GBN
predict_dt | Performs inference over a test data set with a GBN
PsoCtrl | R6 class that defines the PSO controller
psoho | Learn a DBN structure with a PSO approach
randomize_vl_cpp | Randomize a velocity with the given probabilities
rename_nodes_cpp | Return a list of nodes with the time slice appended up to the desired size of the network
time_rename | Renames the columns in a data.table so that they end in '_t_0'
Velocity | R6 class that defines velocities affecting causality lists in the PSO
vel_plus_vel_cpp | Add two Velocities