0

# Efficiency of Binary Classifier

Unsolved
###### Fundamentals

Difficulty: 2 | Problem written by mesakarghm
##### Problem reported in interviews at

We can calculate the efficiency of a Binary Classifier through its confusion matrix. The efficiency of a confusion matrix is defined as the sum of its Sensitivity, Specificity and its Accuracy divided by 3.

$$Efficiency = {(Sensitivity + Specificity + Accuracy) \over 3}$$

Write a function efficiency(TP,TN,FP,FN) which calculates and returns the efficiency of the binary classifier.

Here,

TP -> True Positive

TN -> True Negative

FP -> False Positive

FN -> False Negative

##### Sample Input:
<class 'int'>
TP: 100
<class 'int'>
TN: 50
<class 'int'>
FP: 10
<class 'int'>
FN: 9

##### Expected Output:
<class 'float'>
87.94461634969753

MLPro Premium also allows you to access all our high quality MCQs which are not available on the free tier.

Not able to solve a problem? MLPro premium brings you access to solutions for all problems available on MLPro

Have an issue, the MLPro support team is available 24X7 to Premium users.