fun weightedFMeasure(): Double { val classCounts = DoubleArray(m_NumClasses) var classCountSum = 0.0 for (i in 0 until m_NumClasses) { for (j in 0 until m_NumClasses) { classCounts[i] += m_ConfusionMatrix.get(i).get(j) } classCountSum += classCounts[i] } var fMeasureTotal = 0.0 for (i in 0 until m_NumClasses) { val temp: Double = fMeasure(i) fMeasureTotal += temp * classCounts[i] } return fMeasureTotal / classCountSum }
Prevents this class from being instantiated , except by the create method in this class .