wt_randomforest: wt_randomforest

Description Usage Arguments Examples

View source: R/wt_randomforest.R

Description

Randomforest implementation for stream water temperature prediction including Bayesian hyperparameter optimization. All results are stored automatically in the folder catchment/model_name.

Usage

1
2
3
4
5
6
7
8
9
wt_randomforest(
  train_data,
  test_data = NULL,
  catchment = NULL,
  cv_mode = "repCV",
  model_name = NULL,
  no_cores = parallel::detectCores() - 1,
  seed = NULL
)

Arguments

train_data

Data frame containing training data created by using wt_preprocessing()

test_data

Data frame containing test data created by using wt_preprocessing()

catchment

Catchment name as string, used for storing results in current working directory.

cv_mode

Cross-validation mode. Can either be "repCV" for a 5times repeated 10-fold CV or "timeseriesCV" for a timeslice CV using intial window=730, horizon=90 and skip=60.

model_name

Name of this particular model run as string, used for storing results in the catchment folder.

no_cores

Number of cores used for computation. If NULL parallel::detectCores() - 1 is applied.

seed

Random seed.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(test_catchment)
wt_preprocess(test_catchment)
train_data <- feather::read_feather("test_catchment/train_data.feather")
test_data <- feather::read_feather("test_catchment/test_data.feather")

wt_randomforest(train_data, test_data, "test_catchment", "repCV", "standard_rf")

## End(Not run)

MoritzFeigl/wateRtemp documentation built on Sept. 6, 2021, 6:58 a.m.