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 |
as_named_vector |
Converts a single row data.table into a named vector |
bn_translate_exp |
Experimental function that translates a natPosition vector into a DBN network. |
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. |
create_natcauslist_cpp |
Create a natural causal list from a DBN. This is the C++ backend of the function. |
crop_names_cpp |
If the names of the nodes have "_t_0" appended at the end, remove it |
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_inference_backwards |
Performs exact inference smoothing 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) |
filtered_fold_dt |
Fold a dataset to a certain size and avoid overlapping of different time-series |
filter_same_cycle |
Filter the instances in a data.table that have values of different ids in each row |
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 |
generate_random_network_exp |
Experimental function that generates a random DBN and samples a dataset that defines it |
initialize_cl_cpp |
Create a causality list and initialize it |
init_cl_cpp |
Initialize the nodes vector |
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 |
natCauslist |
This file contains all the classes needed for the natPSOHO structure learning algorithm. It was implemented as an independent package in https://github.com/dkesada/natPSOHO and then merged into dbnR. All the original source files are merged into one to avoid bloating the R/ folder of the package. |
natParticle |
R6 class that defines a Particle in the PSO algorithm |
natPosition |
R6 class that defines DBNs as vectors of natural numbers |
natPsoCtrl |
R6 class that defines the PSO controller |
natPsoho |
Learn a DBN structure with a PSO approach |
natVelocity |
R6 class that defines velocities in the PSO |
nat_cl_to_arc_matrix_cpp |
Create a matrix with the arcs defined in a causlist object |
nat_cte_times_vel_cpp |
Multiply a Velocity by a constant real number |
nat_pos_minus_pos_cpp |
Subtracts two natPositions to obtain the natVelocity that transforms ps1 into ps2 |
nat_pos_plus_vel_cpp |
Add a velocity to a position |
nat_vel_plus_vel_cpp |
Adds two natVelocities |
nodes_gen_exp |
Generates the names of the nodes in t_0 and in all the network |
node_levels |
Defines a level for every node in the net |
one_hot |
One hot encoder for natural numbers without the 0. |
one_hot_cpp |
One-hot encoder for natural numbers without the 0 |
ordering_gen_exp |
Generates the names of n variables. |
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 or a dynamic Bayesian network |
plot_static_network |
Plots a Bayesian networks in a hierarchical way |
Position |
R6 class that defines DBNs as causality lists |
pos_minus_pos_cpp |
Subtracts 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 |
recount_arcs_exp |
Experimental function that recounts the number of arcs in the position |
reduce_freq |
Reduce the frequency of the time series data in a data.table |
rename_nodes_cpp |
Return a list of nodes with the time slice appended up to the desired size of the network |
smooth_ts |
Performs smoothing with the GDBN over a data set |
time_rename |
Renames the columns in a data.table so that they end in '_t_0' |
trunc_geom |
Geometric distribution sampler truncated to a maximum |
Velocity |
R6 class that defines velocities affecting causality lists in the PSO |
vel_plus_vel_cpp |
Add two Velocities |