predict_data: Predict data

Usage Arguments

View source: R/main.R

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
predict_data(
  fitted,
  predictor_data,
  predicted_nodes,
  number_layers,
  continuous_variables,
  discrete_variables,
  time_column = NULL,
  time_format = "%m/%d/%y",
  normalizers = NULL,
  normalize_type = NULL,
  method = "lw",
  debug = FALSE
)

Arguments

fitted

A fitted model

predictor_data

A data frame, each row is evidence

predicted_nodes

List of variables need to predict

number_layers

Number layers of fitted model

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

time_format

Time format of time column, default is

\item

normalizersNormalize parameters, default is NULL

\item

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

A data frame with evidence and predicted variables Predict data library(wrmbn) data("data") data("preprocessed") data("trained_models") predictor_data <- data[2019:2020, c("date", "HND", "HCT")] print(predictor_data) normalizers <- preprocessed$normalizers normalize_type <- preprocessed$normalize_tye fitted <- trained_models$hc$fitted continuous_variables <- c("HND", "HCT") discrete_variables <- c() predicted_nodes <- c("MBT") number_layers <- 3

predicted_data <- predict_data(fitted, predictor_data, predicted_nodes, number_layers, continuous_variables, discrete_variables, time_column = "date", "%m/%d/%y", normalizers, normalize_type, method = "lw", TRUE)

print(predicted_data) actual_data <- data[2019:2021, c("date", "HND", "HCT", "MBT")] print(actual_data)


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