0

Efficiency of Binary Classifier

Unsolved
Fundamentals

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

Amazon
Apple
Facebook
Google
Netflix

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

This is a premium problem, to view more details of this problem please sign up for MLPro Premium. MLPro premium offers access to actual machine learning and data science interview questions and coding challenges commonly asked at tech companies all over the world

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

Get access to Premium only exclusive educational content available to only Premium users.

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

This is a premium feature.
To access this and other such features, click on upgrade below.

Log in to post a comment

Comments
Jump to comment-152
abhishek_kumar • 3¬†months ago

0

Here you have to provide efficiency percentage. Not in Fraction form.

Ready.

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)