Problems
Previous question · 72
Kendall Tau Correlation
easy
Statistics
Next question · 74
Spiral Matrix
medium
Math
Random coding question
NumPy
Language
NumPy
Practice
Interview
AI Tutor
Description
Solution
Discussion
73. Calibration error
medium
General
staff
Function contract
Inputs
n_bins
int
y_prob
np.ndarray
y_true
np.ndarray
Returns
value
float
Examples
Example 1
Input
{
"n_bins"
:
5
,
"y_prob"
:
[
0.9
,
0.6
,
0.2
,
0.8
,
0.1
]
,
"y_true"
:
[
1
,
0
,
1
,
1
,
0
]
}
Output
0.4
Example 2
Input Signature
Argument
Type
n_bins
int
y_prob
np.ndarray
y_true
np.ndarray
Output Signature
Return Name
Type
value
float
Constraints
Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
General
Levels
staff
senior
Tags
calibration-metrics
binning
numpy-vectorization
binary-classification
Similar Questions
Linear Regression
medium
ML Coding
Activation function relu
easy
ML Coding
Text normalization
medium
ML Coding
35 people
are solving this problem
Run
Submit
00:00
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATA
INTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run script
Execute the current editor contents
submit
Grade the current editor contents against all solution test cases
python ("print hello world")
Run an isolated Python command
help
Show all available commands
>>>