The value to use for missing inputs. Defaults to a non-informative value.
Functions
Predicts the desirability values for the given input data.
Plots the desirability function.
References
Many thanks to Max Kuhn for his implementation of the ‘desirability’ package in R. This class is based on the ‘desirability’ package in R, see: https://cran.r-project.org/package=desirability
Examples
from spotdesirability import DBoximport numpy as npimport matplotlib.pyplot as plt# Create a DBox objectdbox = DBox(low=-1.682, high=1.682)# Predict desirability for a range of inputsinputs = np.array([-3, -1.682, 0, 1.682, 3])desirability = dbox.predict(inputs)print(desirability)# [0. 1. 1. 1. 0.]# Plot the desirability functiondbox.plot()
[0. 1. 1. 1. 0.]
Methods
Name
Description
plot
Plots the box-like desirability function.
predict
Predicts the desirability values for the given input data.