Skip to content

Function: classificationReport()

ts
function classificationReport(
   yTrue, 
   yPred, 
   classes?): ClassificationReport;

Defined in: ml/metrics.ts:301

Per-class precision, recall and F1 plus macro/weighted averages. A class the model never predicts scores 0 precision rather than NaN, so the macro average stays comparable across runs.

Parameters

ParameterType
yTrueArrayLike<number>
yPredArrayLike<number>
classes?number

Returns

ClassificationReport

MIT licensed. WebGL2 required.