Welcome to our Support Center

BinaryAccuracy

Description

Calculates how often predictions match binary labels. Type : polymorphic.

 

 

Input parameters

 

Β y_pred : array,Β predicted values.
Β y_true : array,Β true values.
threshold : 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

 

binary_accuracy : float, result.

Use cases

The binary accuracy metric is specifically used in binary classification, a field of machine learning. Binary classification is a type of classification where an output variable can be either 0 (negative, false, class A) or 1 (positive, true, class B).

For example, in the medical field, binary classification can be used to predict whether or not a patient has a certain disease, based on various characteristics. In informatic field, it can be used to determine whether an e-mail is spam or not.

Calculation

The binary accuracy metric is the total number of correct predictions (true positives and true negatives) divided by the total number of predictions (which is the sum of true positives, true negatives, false positives and false negatives).

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
Index