belplauEval | R Documentation |
Calculate error A, B, and total error A+B by comparing two vectors as defined below. One vector represents the truth and the other represents a numerical quantity of importance.
Error A: out of all the comparisons between two elements, what proportion of errors are due to indicating an irrelevant element as more important than a relevant element
Error B: out of all the comparisons between two elements, what proportion of errors are due to indicating a relevant element as less important than an irrelevant element
Total error A+B: the sum of quantity A and quantity B
belplauEval(
belplau_mat,
true_order,
var = "rplau",
err = "A",
is_belplau = TRUE
)
belplau_mat |
belplau matrix e.g. belplau(bca) or a numerical vector quantifying order of importance of the elements of the frame. |
true_order |
a binary vector representing the truth. 1 means relevant and 0 means not relevant. |
var |
= "rplau" column name of the belplau matrix to be used as ordering. |
err |
= "A" kind of error to be evaluated. Can also take value "B" or "A+B". |
is_belplau |
= TRUE whether bel_plau is indeed a belplau matrix or just a numerical vector quantifying order of importance of elements. |
A number in [0,1]
of error A, B, or total error A+B.
Peiyuan Zhu
x <- bca(tt = matrix(c(0,1,1,1,1,0,1,1,1),nrow = 3,
byrow = TRUE), m = c(0.2,0.5, 0.3),
cnames = c("a", "b", "c"), varnames = "x", idvar = 1)
belplau(x)
y <- bca(tt = matrix(c(1,0,0,1,1,1),nrow = 2,
byrow = TRUE), m = c(0.6, 0.4),
cnames = c("a", "b", "c"), varnames = "y", idvar = 1)
xy <- nzdsr(dsrwon(x,y))
z<-belplau(xy,h=ttmatrixPartition(xy$infovar[2],xy$infovar[2]))
belplauEval(z,c(0,1,0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.