From d47baa546e49ead3f3e463a98f9bb15690bd6b09 Mon Sep 17 00:00:00 2001 From: Philipp Baumann Date: Tue, 16 Jan 2018 20:44:31 +0100 Subject: [PATCH] Update manuals because of new `resampling_seed` argument of `fit_pls` and `fit_rf` --- man/fit_pls.Rd | 15 +++++++++++---- man/fit_rf.Rd | 9 +++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/man/fit_pls.Rd b/man/fit_pls.Rd index 0008a7f..43222c1 100644 --- a/man/fit_pls.Rd +++ b/man/fit_pls.Rd @@ -9,15 +9,17 @@ fit_pls(spec_chem, response, variable = NULL, center = TRUE, scale = TRUE, evaluation_method = "test_set", validation = TRUE, split_method = "ken_stone", ratio_val = 1/3, ken_sto_pc = 2, pc, invert = TRUE, tuning_method = "resampling", - resampling_method = "kfold_cv", cv = NULL, pls_ncomp_max = 20, - ncomp_fixed = 5, print = TRUE, env = parent.frame()) + resampling_method = "kfold_cv", cv = NULL, resampling_seed = 123, + pls_ncomp_max = 20, ncomp_fixed = 5, print = TRUE, + env = parent.frame()) pls_ken_stone(spec_chem, response, variable = NULL, center = TRUE, scale = TRUE, evaluation_method = "test_set", validation = TRUE, split_method = "ken_stone", ratio_val = 1/3, ken_sto_pc = 2, pc, invert = TRUE, tuning_method = "resampling", - resampling_method = "kfold_cv", cv = NULL, pls_ncomp_max = 20, - ncomp_fixed = 5, print = TRUE, env = parent.frame()) + resampling_method = "kfold_cv", cv = NULL, resampling_seed = 123, + pls_ncomp_max = 20, ncomp_fixed = 5, print = TRUE, + env = parent.frame()) } \arguments{ \item{spec_chem}{Tibble that contains spectra, metadata and chemical @@ -88,6 +90,11 @@ a fixed number of components.} \item{cv}{Depreciated. Use \code{resampling_method} instead.} +\item{resampling_seed}{Random seed (integer) that will be used for generating +resampling indices, which will be supplied to \code{caret::trainControl}. +This makes sure that modeling results are constant when re-fitting. +Default is \code{resampling_seed = 123}.} + \item{pls_ncomp_max}{Maximum number of PLS components that are evaluated by caret::train. Caret will aggregate a performance profile using resampling for an integer sequence from 1 to \code{pls_ncomp_max}} diff --git a/man/fit_rf.Rd b/man/fit_rf.Rd index 65c88a3..64fd902 100644 --- a/man/fit_rf.Rd +++ b/man/fit_rf.Rd @@ -7,8 +7,8 @@ fit_rf(spec_chem, response, variable = NULL, evaluation_method = "test_set", validation = NULL, split_method = "ken_stone", ratio_val, ken_sto_pc = 2, pc = NULL, invert = TRUE, - tuning_method = "resampling", cv = NULL, ntree_max = 500, - print = TRUE, env = parent.frame()) + tuning_method = "resampling", resampling_seed = 123, cv = NULL, + ntree_max = 500, print = TRUE, env = parent.frame()) } \arguments{ \item{spec_chem}{Tibble that contains spectra, metadata and chemical @@ -62,6 +62,11 @@ parameter number of PLS components. In this case, the value supplied by \code{ncomp_fixed}` is used to set model complexity at a fixed number of components.} +\item{resampling_seed}{Random seed (integer) that will be used for generating +resampling indices, which will be supplied to \code{caret::trainControl}. +This makes sure that modeling results are constant when re-fitting. +Default is \code{resampling_seed = 123}.} + \item{cv}{Depreciated. Use \code{resampling_method} instead.} \item{ntree_max}{Maximum random forest trees