org.apache.mahout.classifier.stats

ConfusionMatrix

class ConfusionMatrix extends AnyRef

Ported from org.apache.mahout.classifier.ConfusionMatrix.java

The ConfusionMatrix Class stores the result of Classification of a Test Dataset.

The fact of whether there is a default is not stored. A row of zeros is the only indicator that there is no default.

See http://en.wikipedia.org/wiki/Confusion_matrix for background

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConfusionMatrix
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConfusionMatrix(labels: Collection[String] = null, defaultLabel: String = "unknown")

    labels

    The labels to consider for classification

    defaultLabel

    default unknown label

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. def addInstance(correctLabel: String, classifiedLabel: String): Unit

  7. def addInstance(correctLabel: String, classifiedResult: ClassifierResult): Unit

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. var confusionMatrix: Array[Array[Int]]

    Matrix Constructor

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

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def getAccuracy: Double

  15. def getAccuracy(label: String): Double

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def getConfusionMatrix: Array[Array[Int]]

  18. def getCorrect(label: String): Int

  19. def getCount(correctLabel: String, classifiedLabel: String): Int

  20. def getDefaultLabel: String

  21. def getF1score(label: String): Double

  22. def getKappa: Double

    Accuracy v.

    Accuracy v.s. randomly classifying all samples. kappa() = (totalAccuracy() - randomAccuracy()) / (1 - randomAccuracy()) Cohen, Jacob. 1960. A coefficient of agreement for nominal scales. Educational And Psychological Measurement 20:37-46.

    Formula and variable names from: http://www.yale.edu/ceo/OEFS/Accuracy.pdf

    returns

    double

  23. def getLabels: List[String]

  24. def getMatrix: Matrix

  25. def getNormalizedStats: RunningAverageAndStdDev

    Standard deviation of normalized producer accuracy Not a standard score

    Standard deviation of normalized producer accuracy Not a standard score

    returns

    double

  26. def getPrecision(label: String): Double

  27. def getRecall(label: String): Double

  28. def getReliability: Double

  29. def getSmallLabel(i: Int): String

  30. def getTotal(label: String): Int

  31. def getWeightedF1score: Double

  32. def getWeightedPrecision: Double

  33. def getWeightedRecall: Double

  34. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  35. var i: Integer

  36. def incrementCount(correctLabel: String, classifiedLabel: String): Unit

  37. def incrementCount(correctLabel: String, classifiedLabel: String, count: Int): Unit

  38. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  39. val labelMap: HashMap[String, Integer]

  40. def merge(b: ConfusionMatrix): ConfusionMatrix

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

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

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

    Definition Classes
    AnyRef
  44. def numLabels: Int

  45. def putCount(correctLabel: String, classifiedLabel: String, count: Int): Unit

  46. var samples: Int

  47. def setMatrix(m: Matrix): Unit

  48. def sortLabels(labels: Map[String, Integer]): Array[String]

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

    Definition Classes
    AnyRef
  50. def toString(): String

    This is overloaded.

    This is overloaded. toString() is not a formatted report you print for a manager :) Assume that if there are no default assignments, the default feature was not used

    Definition Classes
    ConfusionMatrix → AnyRef → Any
  51. def verifyLabels(length: Int, sorted: Array[String]): Unit

  52. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped