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.
- Alphabetic
- By Inheritance
- ConfusionMat
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
pos_neg: (Double, Double, Double, Double)
Return the confusion matrix for 'k = 2' as a tuple (tn, fp, fn, tp).
-
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )