Previous question · 1377
Oscar winners 2001-2009
easyDatabase
Next question · 1379
Average quarterback height
easyDatabase
Random coding question

1378. Threshold optimization

medium
GeneralGeneral
staff
Function contract
Inputs
y_prob
np.ndarray
y_true
np.ndarray
Returns
value
tuple

Examples

Input
{
  "y_prob": [
    0.1,
    0.4,
    0.35,
    0.8,
    0.7
  ],
  "y_true": [
    0,
    1,
    1,
    0,
    1
  ]
}
Output
[
  0.35,
  0.8571428571428571
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
staff
senior
entry
Tags
threshold-optimization
f1-score
binary-classification
sweep-line

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
22 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands