Packages

class ConfusionMat extends AnyRef

The ConfusionMat object provides functions for determining the confusion matrix as well as derived quality metrics such as accuracy, precsion, recall, and Cohen's kappa coefficient.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfusionMat
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConfusionMat(y: VectoI, yp: VectoI, k: Int = 2)

    y

    the actual class labels

    yp

    the precicted class labels

    k

    the number class values

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def accuracy: Double

    Compute the accuracy of the classification, i.e., the fraction of correct classifications.

    Compute the accuracy of the classification, i.e., the fraction of correct classifications. Note, the correct classifications 'tp_i' are in the main diagonal of the confusion matrix.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def confusion: MatriI

    Compare the actual class 'y' vector versus the predicted class 'yp' vector, returning the confusion matrix, which for 'k = 2' is

    Compare the actual class 'y' vector versus the predicted class 'yp' vector, returning the confusion matrix, which for 'k = 2' is

    yp 0 1 ---------- y 0 | tn fp | 1 | fn tp | ----------

    See also

    www.dataschool.io/simple-guide-to-confusion-matrix-terminology

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def f1_measure(prec: Double, recl: Double): Double

    Compute the F1-measure, i.e., the harmonic mean of the precision and recall.

    Compute the F1-measure, i.e., the harmonic mean of the precision and recall.

    prec

    the precision

    recl

    the recall

  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def kappa: Double

    Compute Cohen's 'kappa' coefficient that measures agreement between actual 'y' and predicted 'yp' classifications.

    Compute Cohen's 'kappa' coefficient that measures agreement between actual 'y' and predicted 'yp' classifications.

    See also

    en.wikipedia.org/wiki/Cohen%27s_kappa

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def pos_neg: (Double, Double, Double, Double)

    Return the confusion matrix for 'k = 2' as a tuple (tn, fp, fn, tp).

  20. def prec_recl: (VectoD, VectoD, Double, Double)

    Compute micro-precision and micro-recall, which gives the precision and recall for each class i in {0, 1, ...

    Compute micro-precision and micro-recall, which gives the precision and recall for each class i in {0, 1, ... k}. Also return the macro-precision and macro-recall that are simply their respective means. The precision is the fraction classified as true, which are actually true. The recall is the fraction of the actually true, which are classified as true.

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped