1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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 \itemnormalizersNormalize parameters, default is NULL \itemnormalize_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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.