UtilityFunction
Details
- With UtilityFunctionf, the utility value assigned to actual value va and predicted value vp is taken to be f[va,vp].
- In the case of Classify, f is typically an association of associations, of the form <class1<class1u11,class2u12… >,… >. Here uij is the utility matrix, with i being the actual class and j the predicted class.
Examples
open allclose allBasic Examples (2)
For a new example, the most probable class is predicted:
Set the decision utility to penalize misclassification of class "diseased":
The decision utility can be specified in the classifier:
Use a utility function that includes an Indeterminate decision possibility (independently of the option IndeterminateThreshold):
Visualize the probability density for a given example:
By default, the value with the highest probability density is predicted:
Define a utility function that penalizes the predicted value being smaller than the actual value:
Applications (1)
Load the training set and test set of the "Mushroom" dataset:
Train a classifier on a part of the training set:
Visualize the confusion matrix of the classifier on the test set:
Visualize the confusion matrix obtained when the classifier has a different value of UtilityFunction:
Text
Wolfram Research (2014), UtilityFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/UtilityFunction.html.
CMS
Wolfram Language. 2014. "UtilityFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UtilityFunction.html.
APA
Wolfram Language. (2014). UtilityFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UtilityFunction.html