impute_missing_data: Impute missing data in data frame

Description Usage Arguments Value Examples

View source: R/main.R

Description

Impute missing data in data frame

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
impute_missing_data(
  fitted,
  data,
  continuous_variables,
  discrete_variables,
  time_column = NULL,
  normalize_type = NULL,
  normalizers = NULL,
  debug = FALSE
)

Arguments

fitted

A fitted model

data

A data frame, contains missing data, each row is a time value and observations, structure is the same as learning data before process

continuous_variables

Column names of continuous variables

discrete_variables

Column names of discrete variables

time_column

Column name of "data", which values is time stamp, default is NULL

normalize_type

Normalization type for continuous variables, "mean_normalization", "min_max" or "standardisation", default is NULL

normalizers

Normalize parameters, default is NULL

Value

A full filled data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(wrmbn)
data("data")
data("preprocessed")
data("trained_models")
head(data)
continuous_variables <- preprocessed$continuous_variables
discrete_variables <- preprocessed$discrete_variables
desire_layers <- preprocessed$desire_layers
time_column <- "date"
normalize_type <- preprocessed$normalize_tye
normalizers <- preprocessed$normalizers
fitted <- trained_models$hc$fitted

imputed_data <- impute_missing_data(fitted, data, continuous_variables, discrete_variables,
                                    time_column, normalize_type, normalizers, debug = FALSE)
head(imputed_data)

bayes-modeling/wrmbn documentation built on Dec. 19, 2021, 6:45 a.m.