keystoneml.evaluation

MulticlassMetrics

case class MulticlassMetrics(confusionMatrix: DenseMatrix[Double]) extends Product with Serializable

Contains the confusion matrix for a multiclass classifier, and provides common metrics such as micro & macro precision & recall

Similar to MLlib's org.apache.spark.mllib.evaluation.MulticlassMetrics, but only does one pass over the data to calculate everything

Sample metrics compared at: Sokolova, M., & Lapalme, G. (2009). A systematic analysis of performance measures for classification tasks. Information Processing and Management, 45, p. 427-437 http://rali.iro.umontreal.ca/rali/sites/default/files/publis/SokolovaLapalme-JIPM09.pdf

confusionMatrix

rows are the true labels, cols are the predicted labels

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MulticlassMetrics
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MulticlassMetrics(confusionMatrix: DenseMatrix[Double])

    confusionMatrix

    rows are the true labels, cols are the predicted labels

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def avgAccuracy: Double

  8. def avgError: Double

  9. val classMetrics: Array[BinaryClassificationMetrics]

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. val confusionMatrix: DenseMatrix[Double]

    rows are the true labels, cols are the predicted labels

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def macroFScore(beta: Double = 1.0): Double

  17. def macroPrecision: Double

  18. def macroRecall: Double

  19. def microFScore(beta: Double = 1.0): Double

  20. def microPrecision: Double

  21. def microRecall: Double

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def pprintConfusionMatrix(classes: Array[String]): String

    Pretty-prints the confusion matrix in a style similar to Mahout.

    Pretty-prints the confusion matrix in a style similar to Mahout. Predicted labels are in columns. True labels in rows

    classes

    An array containing the class names, where the indices are the class labels

    returns

    the pretty-printed string

  26. def summary(classes: Array[String]): String

    Pretty-prints a summary of how the multiclass classifier did (including the confusion matrix)

    Pretty-prints a summary of how the multiclass classifier did (including the confusion matrix)

    classes

    An array containing the class names, where the indices are the class labels

    returns

    the pretty-printed string

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def totalAccuracy: Double

  29. def totalError: Double

  30. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped