Learn R Programming

dbnR (version 0.7.8)

fit_dbn_params: Fits a markovian n DBN model

Description

Fits the parameters of the DBN via MLE. The "mu" vector of means and the "sigma" covariance matrix are set as attributes of the dbn.fit object for future exact inference.

Usage

fit_dbn_params(net, f_dt, ...)

Value

a "dbn.fit" S3 object with the fitted net

Arguments

net

the structure of the DBN

f_dt

a folded data.table

...

additional parameters for the bn.fit function

Examples

Run this code
size = 3
dt_train <- dbnR::motor[200:2500]
net <- learn_dbn_struc(dt_train, size)
f_dt_train <- fold_dt(dt_train, size)
fit <- fit_dbn_params(net, f_dt_train, method = "mle-g")

Run the code above in your browser using DataLab