Allow the user to view or change global settings which affect default behaviors of functions in the MachineShop package.
settings(...)character names of settings to view, name = value pairs
giving the values of settings to change, a vector of these, "reset"
to restore all package defaults, or no arguments to view all settings.
Partial matching of setting names is supported.
The setting value if only one is specified to view. Otherwise, a
list of the values of specified settings as they existed prior to any
requested changes. Such a list can be passed as an argument to
settings to restore their values.
controlfunction, function name, or call
defining a default resampling method [default: "CVControl"].
cutoffnumeric (0, 1) threshold above which binary factor probabilities are classified as events and below which survival probabilities are classified [default: 0.5].
dist.Survcharacter string specifying distributional
approximations to estimated survival curves for predicting survival
means. Choices are "empirical" for the Kaplan-Meier estimator,
"exponential", or "weibull" (default).
dist.SurvProbscharacter string specifying distributional
approximations to estimated survival curves for predicting survival
events/probabilities. Choices are "empirical" (default) for the
Kaplan-Meier estimator, "exponential", or "weibull".
gridsize argument to Grid indicating
the number of parameter-specific values to generate automatically for
tuning of models that have pre-defined grids or a
Grid function, function name, or call [default: 3].
max.printnumber of models or data rows to show with print
methods or Inf to show all [default: 10].
method.EmpiricalSurvcharacter string specifying the
empirical method of estimating baseline survival curves for Cox
proportional hazards-based models. Choices are "breslow",
"efron" (default), or "fleming-harrington".
metrics.ConfusionMatrixfunction, function name, or vector of
these with which to calculate performance metrics for
confusion matrices [default: c(Accuracy = "accuracy", Kappa =
"kappa2", `Weighted Kappa` = "weighted_kappa2", Sensitivity =
"sensitivity", Specificity = "specificity")].
metrics.factorfunction, function name, or vector of these
with which to calculate performance metrics for factor
responses [default: c(Brier = "brier", Accuracy = "accuracy",
Kappa = "kappa2", `Weighted Kappa` = "weighted_kappa2", `ROC AUC` =
"roc_auc", Sensitivity = "sensitivity", Specificity = "specificity")].
metrics.matrixfunction, function name, or vector of these
with which to calculate performance metrics for matrix
responses [default: c(RMSE = "rmse", R2 = "r2", MAE = "mae")].
metrics.numericfunction, function name, or vector of these
with which to calculate performance metrics for numeric
responses [default: c(RMSE = "rmse", R2 = "r2", MAE = "mae")].
metrics.Survfunction, function name, or vector of these with
which to calculate performance metrics for survival
responses [default: c(`C-Index` = "cindex", Brier = "brier",
`ROC AUC` = "roc_auc", Accuracy = "accuracy")].
progress.resamplelogical indicating whether to display a
progress bar during resampling [default: TRUE]. Displayed only
if a computing cluster is not registered or is registered with the
doSNOW package.
requirenames of installed packages to load during parallel
execution of resampling algorithms [default: c("MachineShop",
"survival", "recipes")].
resetcharacter names of settings to reset to their default values.
RHS.formulanon-modifiable character vector of operators and functions allowed in traditional formula specifications.
stat.Curvefunction or character string naming a function
to compute one summary statistic at each cutoff value of resampled
metrics in performance curves, or NULL for resample-specific
metrics [default: "base::mean"].
stat.Resamplesfunction or character string naming a function
to compute one summary statistic to control the ordering of models in
plots [default: "base::mean"].
stat.trainfunction or character string naming a function
to compute one summary statistic on resampled performance metrics for
input selection or tuning or
for model selection or tuning
[default: "base::mean"].
stats.PartialDependencefunction, function name, or vector of
these with which to compute partial dependence
summary statistics [default: c(Mean = "base::mean")].
stats.Resamplesfunction, function name, or vector of these
with which to compute summary statistics on resampled performance
metrics [default: c(Mean = "base::mean", Median = "stats::median",
SD = "stats::sd", Min = "base::min", Max = "base::max")].
verbose.resamplelogical indicating whether to enable verbose
messages when resampling [default: FALSE].
# NOT RUN {
## View all current settings
settings()
## Change settings
presets <- settings(control = "BootControl", grid = 10)
## View one setting
settings("control")
## View multiple settings
settings("control", "grid")
## Restore the previous settings
settings(presets)
# }
Run the code above in your browser using DataLab