Title: | Function Optimization and Ranking via Desirability Functions |
---|---|
Description: | S3 classes for multivariate optimization using the desirability function by Derringer and Suich (1980). |
Authors: | Max Kuhn |
Maintainer: | Max Kuhn <[email protected]> |
License: | GPL-2 |
Version: | 2.1 |
Built: | 2024-10-31 22:09:13 UTC |
Source: | https://github.com/topepo/desirability |
Functions implementing multivariate optimization and ranking using the desirability function approach described in Derringer and Suich (1980)
## Default S3 method: dMax(low, high, scale = 1, tol = NULL, ...) ## Default S3 method: dMin(low, high, scale = 1, tol = NULL, ...) ## Default S3 method: dTarget(low, target, high, lowScale = 1, highScale = 1, tol = NULL, ...) ## Default S3 method: dArb(x, d, tol = NULL, ...) ## Default S3 method: dBox(low, high, tol = NULL, ...) ## Default S3 method: dCategorical(values, tol = NULL, ...) ## Default S3 method: dOverall(...)
## Default S3 method: dMax(low, high, scale = 1, tol = NULL, ...) ## Default S3 method: dMin(low, high, scale = 1, tol = NULL, ...) ## Default S3 method: dTarget(low, target, high, lowScale = 1, highScale = 1, tol = NULL, ...) ## Default S3 method: dArb(x, d, tol = NULL, ...) ## Default S3 method: dBox(low, high, tol = NULL, ...) ## Default S3 method: dCategorical(values, tol = NULL, ...) ## Default S3 method: dOverall(...)
low |
a constant to define the desirability function for |
high |
a constant to define the desirability function for |
target |
a constant to define the desirability function for |
scale |
the scaling factor for |
lowScale |
the scaling factor for |
highScale |
the scaling factor for |
x |
a set of input values |
d |
a set of desirabilites between zero and one (inclusive) that match the length of |
values |
a named numeric vector of possible values |
tol |
an optional tolerance for zero desirability. When this is non-null, zero desirabilites are replaced with this value |
... |
For |
The functions dMax
, dMin
, dTarget
ande dOverall
are the basic equations used by Derringer and Suich (1980). dBox
is a simple step funciton between two points. dArb
can be used to create other shapes that do not fall into the other funcional forms. See the package vignette or the references for more details
a list. Common values are:
tol |
the value specified by the |
call |
the origianl function call |
Max Kuhn
Derringer, G. and Suich, R. (1980), Simultaneous Optimization of Several Response Variables. Journal of Quality Technology 12, 214–219.
dMax.default(1,3) dMax(1,3)
dMax.default(1,3) dMax(1,3)
Predicted values based on desirability objects
## S3 method for class 'dMax' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dMin' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dTarget' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dArb' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dBox' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dCategorical' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dOverall' predict(object, newdata = data.frame(NA, ncol = length(object$d)), all = FALSE, ...)
## S3 method for class 'dMax' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dMin' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dTarget' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dArb' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dBox' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dCategorical' predict(object, newdata = NA, missing = object$missing, ...) ## S3 method for class 'dOverall' predict(object, newdata = data.frame(NA, ncol = length(object$d)), all = FALSE, ...)
object |
a object of class: |
newdata |
values of the response for predicting desirability |
all |
a logical (for |
missing |
a number between 0 and 1 for missing values (the internally estimated value is used by default) |
... |
no currently used |
The responses are translated into desirability units.
a vector, unless predict.dOverall
is used with all=TRUE
,
in which case a matrix is returned.
Max Kuhn
Derringer, G. and Suich, R. (1980), Simultaneous Optimization of Several Response Variables. Journal of Quality Technology 12, 214–219.
d1 <- dMin(1,3) d2 <- dTarget(1, 2, 3) d3 <- dCategorical(c("a" = .1, "b" = .7)) dAll <- dOverall(d1, d2, d3) outcomes <- data.frame(seq(0, 4, length = 10), seq(0.5, 4.5, length = 10), sample(letters[1:2], 10, replace = TRUE)) names(outcomes) <- c("x1", "x1", "x3") predict(d1, outcomes[,2]) predict(d2, outcomes[,2]) predict(d3, outcomes[,3]) predict(dAll, outcomes) predict(dAll, outcomes, all = TRUE)
d1 <- dMin(1,3) d2 <- dTarget(1, 2, 3) d3 <- dCategorical(c("a" = .1, "b" = .7)) dAll <- dOverall(d1, d2, d3) outcomes <- data.frame(seq(0, 4, length = 10), seq(0.5, 4.5, length = 10), sample(letters[1:2], 10, replace = TRUE)) names(outcomes) <- c("x1", "x1", "x3") predict(d1, outcomes[,2]) predict(d2, outcomes[,2]) predict(d3, outcomes[,3]) predict(dAll, outcomes) predict(dAll, outcomes, all = TRUE)