Description Usage Arguments Examples
impute invalid data with models created by define_model_rf
1 2 3 4 | impute_with_model(db, id, rmsle_max = 0.03, h2o_port = 54321,
h2o_ip = "localhost")
update_learning_db(db, target = "CTY")
|
db |
aggregated load dataset |
id |
model id |
rmsle_max |
error max of a model, if less, model will be used to replace invalid data. |
h2o_port |
port number of the H2O server |
h2o_ip |
IP address of the server where H2O is running |
target |
to be removed, model target |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ## Not run:
load_dir <- "/Users/davidgohel/Documents/consulting/RTE/load_files"
load_data <- anta_load(data_dir = load_dir )
load_data <- augment_validation(load_data)
aggregated_db <- agg_data(load_data)
aggregated_db <- augment_validation(aggregated_db)
aggregated_db <- data_correct_with_rules(aggregated_db)
aggregated_db <- augment_process_summary(aggregated_db)
dat <- as_learning_db(aggregated_db )
x_vars <- c(
"year.iso", "week.iso", "hour.iso",
"day.iso", "light_time", "is_off", "likely_off",
"DAILY_MIN_CTY_MINUS_1", "DAILY_AVG_CTY_MINUS_1", "DAILY_MAX_CTY_MINUS_1",
"HOUR_SHIFT_CTY_MINUS_1")
dat <- define_model_rf( data = dat, x_vars = x_vars, y_var = "CTY",
save_model_dir = file.path( getwd(), "ttt"),
id = "BACKWARD" )
x_vars <- c(
"year.iso", "week.iso", "hour.iso", "day.iso", "light_time",
"is_off", "likely_off", "DAILY_MIN_CTY_PLUS_1",
"DAILY_AVG_CTY_PLUS_1", "DAILY_MAX_CTY_PLUS_1", "HOUR_SHIFT_CTY_PLUS_1")
dat <- define_model_rf( data = dat, x_vars = x_vars, y_var = "CTY",
save_model_dir = file.path( getwd(), "ttt"),
id = "FORWARD" )
for(i in 1:10 ){
dat <- impute_with_model(dat, id = "FORWARD")
dat <- impute_with_model(dat, id = "BACKWARD")
dat <- update_learning_db(dat)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.