Welcome to our Support Center

Accuracy

Description

Calculates how often predictions equal labels. Type : polymorphic.

 

 

Input parameters

 

Β  y_pred : array,Β predicted values (numerical label for example, [ 0 ], [ 1 ] and [ 2 ] for 3-class problem).
Β Β y_true : array,Β true values (numerical label for example, [ 0 ], [ 1 ] and [ 2 ] for 3-class problem).

 

Output parameters

 

Β accuracy : float, result.

Use cases

Accuracy is a performance measure commonly used in machine learning, natural language processing (NLP) and computer vision. It is generally used when the output classes of a classification model are equally balanced.

It can be used to evaluate a model in various scenarios, for example :

    • Binary classification : where an output variable can be either 0 or 1. For example, to determine whether an email is spam or not.
    • Multiclass classification : where an output variable can have more than two possible states. For example, to predict the breed of a dog from an image.

 

Calculation

Computes the frequency with which y_pred matches y_true. This frequency is ultimately returned as binary accuracy : an idempotent operation that simply divides total by count.

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