Allow the user to view or change global settings which affect default behaviors of functions in the MachineShop package.
settings(...)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.
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.
controlfunction, function name, or object
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].
distr.SurvMeanscharacter string specifying distributional
approximations to estimated survival curves for predicting survival
means. Choices are "empirical" for the Kaplan-Meier estimator,
"exponential", "rayleigh", or "weibull" (default).
distr.SurvProbscharacter string specifying distributional
approximations to estimated survival curves for predicting survival
events/probabilities. Choices are "empirical" (default) for the
Kaplan-Meier estimator, "exponential", "rayleigh", or
"weibull".
gridsize argument to TuningGrid
indicating the number of parameter-specific values to generate
automatically for tuning of models that have
pre-defined grids or a TuningGrid function, function name,
or object [default: 3].
method.EmpiricalSurvcharacter string specifying the
empirical method of estimating baseline survival curves for Cox
proportional hazards-based models. Choices are "breslow" or
"efron" (default).
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")].
print_maxnumber of models or data rows to show with print
methods or Inf to show all [default: 10].
requirenames of installed packages to load during parallel
execution of resampling algorithms [default: "MachineShop"].
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.Resamplefunction or character string naming a function
to compute one summary statistic to control the ordering of models in
plots [default: "base::mean"].
stat.TrainingParamsfunction 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.Resamplefunction, 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")].
## 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