Nothing
test_that("Weak ranking loss is implemented correctly",{
y<-c(-3, 10.3,-8, 12, 14,-0.5, 29,-1.1,-5.7, 119)
yhat<-c(0.02, 0.6, 0.1, 0.47, 0.82, 0.04, 0.77, 0.09, 0.01, 0.79)
expect_equal(WeakRank(4)@risk(y,yhat),0.2)
expect_equal(WeakRank(5)@risk(y,yhat),0)
expect_error(WeakRank(-0.4)@risk(c(1,2,3),c(1,2,3)))
expect_error(WeakRank(-4)@risk(c(1,2,3),c(1,2,3)))
expect_error(WeakRank(2)@risk(c(1,2,3,4),c(1,2,3)))
expect_error(WeakRank(6)@risk(c(1,2,3),c(1,2,3)))
expect_warning(WeakRank(3)@risk(c(2,3,1),c(1,2,3)))
expect_equal(WeakRank(3)@risk(c(2,3,1),c(1,2,3)),0)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.