emmalanguage / emma-lib

2 stars 4 forks source link

Create `ml.classification.eval` module #9

Closed aalexandrov closed 7 years ago

aalexandrov commented 7 years ago

Should contain basic evaluation functionality for predictive models.

Prototype interface

object eval {
  type Hypothesis = DVector => Boolean
  type TestBag = DataBag[LDPoint[ID, Boolean]]

  val TP = 0
  val FP = 1
  val FN = 2
  val TN = 3

  def apply(h: Hypthesis)(xs: TestBag): DataBag[LPoint[ID, Int]] = ???

  def precision(h: Hypothesis)(xs: TestBag): Double = ???

  def recall(h: Hypothesis)(xs: TestBag): Double = ???

  def f1score(h: Hypothesis)(xs: TestBag): Double = ???
}