Skip to content

precision

precision(yTrue, yPred, positiveLabel?): number

Defined in: ds/src/ml/metrics.js:180

Precision score (for binary classification)

Parameters

yTrue

any[]

True labels

yPred

any[]

Predicted labels

positiveLabel?

any = 1

Label to consider as positive

Returns

number

Precision