evalml.objectives.CostBenefitMatrix¶
-
class
evalml.objectives.
CostBenefitMatrix
(true_positive, true_negative, false_positive, false_negative)[source]¶ Score using a cost-benefit matrix. Scores quantify the benefits of a given value, so greater numeric scores represents a better score. Costs and scores can be negative, indicating that a value is not beneficial. For example, in the case of monetary profit, a negative cost and/or score represents loss of cash flow.
-
name
= 'Cost Benefit Matrix'¶
-
greater_is_better
= True¶
-
perfect_score
= inf¶
-
positive_only
= False¶
-
problem_types
= [<ProblemTypes.BINARY: 'binary'>, <ProblemTypes.TIME_SERIES_BINARY: 'time series binary'>]¶
-
score_needs_proba
= False¶
Methods
Create instance of CostBenefitMatrix.
Calculate the percent difference between scores.
Apply a learned threshold to predicted probabilities to get predicted classes.
Calculates cost-benefit of the using the predicted and true values.
Learn a binary classification threshold which optimizes the current objective.
Returns a numerical score indicating performance based on the differences between the predicted and actual values.
Validates the input based on a few simple checks.
-