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.

Methods

__init__

Create instance of CostBenefitMatrix.

calculate_percent_difference

Calculate the percent difference between scores.

decision_function

Apply a learned threshold to predicted probabilities to get predicted classes.

objective_function

Calculates cost-benefit of the using the predicted and true values.

optimize_threshold

Learn a binary classification threshold which optimizes the current objective.

score

Returns a numerical score indicating performance based on the differences between the predicted and actual values.

validate_inputs

Validates the input based on a few simple checks.

Class Inheritance

Inheritance diagram of CostBenefitMatrix