Options
All
  • Public
  • Public/Protected
  • All
Menu

ml-roc-multiclass

Index

Functions

getAuc

  • getAuc(curves: Curve[]): number
  • Returns the Area under the curve.

    Parameters

    • curves: Curve[]

      Object containing the true positivie and false positive rate vectors.

    Returns number

    Area under the curve.

getBinaryClassifiers

  • getBinaryClassifiers(responses: string[], predictions: number[]): { falseNegatives: number[]; falsePositives: number[]; trueNegatives: number[]; truePositives: number[] }
  • Returns a ROC (Receiver Operating Characteristic) curve for a given response and prediction vectors.

    Parameters

    • responses: string[]

      Array containing category metadata.

    • predictions: number[]

      Array containing the results of regression.

    Returns { falseNegatives: number[]; falsePositives: number[]; trueNegatives: number[]; truePositives: number[] }

    sensitivities and specificities as a object.

    • falseNegatives: number[]
    • falsePositives: number[]
    • trueNegatives: number[]
    • truePositives: number[]

getClasses

  • getClasses(array: string[]): Class[]
  • Parameters

    • array: string[]

      Array containing category metadata

    Returns Class[]

    Class object.

getRocCurve

  • getRocCurve(responses: string[], predictions: number[]): Curve[]
  • Returns a ROC (Receiver Operating Characteristic) curve for a given response and prediction vectors.

    Parameters

    • responses: string[]

      Array containing category metadata.

    • predictions: number[]

      Array containing the results of regression.

    Returns Curve[]

    sensitivities and specificities as a object.