Skip to content

Commit

Permalink
Added test for F1 score for R
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalkarn committed Jul 19, 2015
1 parent 5b6771d commit 1069ed5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/inst/tests/test-elementwise.r
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,10 @@ test.sle <- function()
checkEqualsNumeric(sle(3.4,3.4), 0)
checkEqualsNumeric(sle(exp(2)-1,exp(1)-1), 1)
}

test.f1 <- function()
{
checkEqualsNumeric(f1(c(3,4,5),c(3,4)), 0.8)
checkEqualsNumeric(f1(7,1), 0)
checkEqualsNumeric(f1(7,c(1,1)), 0)
}

0 comments on commit 1069ed5

Please sign in to comment.