v_measure: Compute V-measure

Description Usage Arguments Value References See Also Examples

View source: R/utility.R

Description

Compute V-measure, a segmentation evaluation measure, which is based upon two criteria for clustering usefulness, homogeneity and completeness.

Usage

1
v_measure(sig, est, beta = 1)

Arguments

sig

true signal; a numeric vector

est

estimator; a numeric vector

beta

parameter in definition of V-measure, see (Rosenberg and Hirschberg, 2007) for details

Value

A scalar takes value in [0, 1], with a larger value indicating higher accuracy.

References

Rosenberg, A., and Hirschberg, J. (2007). V-measure: a conditional entropy-based external cluster evaluation measures. Proc. Conf. Empirical Methods Natural Lang. Process., (June):410–420.

See Also

computeFdp, smuce, fdrseg, evalStepFun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# simulate data
u0 <- c(rep(1, 50), rep(5, 50))
Y  <- rnorm(100, u0)

# compute FDRSeg
uh <- fdrseg(Y)

plot(Y, pch = 20, col = "grey", xlab = "", ylab = "")
lines(u0, type = "s", col = "blue")
lines(evalStepFun(uh), type = "s", col = "red")
legend("topleft", c("Truth", "FDRSeg"), lty = c(1, 1), col = c("blue", "red"))

# compute V-measure
vm <- v_measure(u0, evalStepFun(uh))
print(vm)

FDRSeg documentation built on May 2, 2019, 9:43 a.m.