Welcome to our Support Center

TrueNegatives

Description

Calculates the number of true negatives. Type : polymorphic.

 

 

Input parameters

 

 y_pred : array, predicted values (logits values).
 y_true : array, true values (logits values, or binary values if the threshold value is between 0 and 1).
 thresholds : float, representing the threshold for deciding whether prediction and true values are 1 or 0 (above the threshold is true, below is false).

 

Output parameters

 

true_negatives : float, result.

Use cases

The “TrueNegatives” metric is commonly used in machine learning, particularly for binary classification tasks. This metric counts the number of true negatives, i.e. the number of samples that have been correctly classified as negative by the model.

Here are some examples of specific areas where “TrueNegatives” can be used :

    • Spam detection : as mentioned above, in spam detection, true negatives are correctly identified non-spam emails.
    • Medical diagnosis : in disease classification, a true negative would be a healthy patient correctly identified as such.
    • Fraud detection : in the financial field, a true negative would be a non-fraudulent transaction that has been correctly identified as such.

 

Calculation

“TrueNegatives” metric is used in the context of binary classification.

A “True Negative” (TN) occurs when a model correctly predicts the negative class for an example that is actually of the negative class. In other words, the model predicted that the event would not occur, and it did not.

 

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install HAIBAL library to run it).

Easy to use

Table of Contents