In cc.factorie.package.sampleVariance: Since this should return variance as
opposed to standard deviation, we should not take the square root before
returning. Correction below...
def sampleVariance(ds:cc.factorie.util.DoubleSeq, mean:Double): Double = {
val len = ds.length; var i = 0
var variance = 0.0
while (i < len) {
val diff = mean - ds(i)
variance += diff * diff
i += 1
}
// Since this is variance, we shouldn't take the square root -- MEF 10/23/2012
//math.sqrt(variance / (len - 1))
variance / (len - 1)
}
Original issue reported on code.google.com by mark.fry...@gmail.com on 23 Oct 2012 at 2:10
Original issue reported on code.google.com by
mark.fry...@gmail.com
on 23 Oct 2012 at 2:10