The value to use for missing inputs. Defaults to a non-informative value.
Functions
Predicts the desirability values for the given categorical input data.
Plots the desirability function for the categorical inputs.
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 DCategoricalimport matplotlib.pyplot as plt# Define desirability values for categoriesvalues = {"A": 0.1, "B": 0.9, "C": 0.5}# Create a DCategorical objectdcat = DCategorical(values)# Predict desirability for a list of categoriesinputs = ["A", "B", "C"]desirability = dcat.predict(inputs)print(desirability)# [0.1 0.9 0.5]# Plot the desirability functiondcat.plot()
[0.1 0.9 0.5]
Methods
Name
Description
plot
Plots the desirability function for the categorical inputs.
predict
Predicts the desirability values for the given categorical input data.