public double getModelQuality ( ) { for ( int p = 0 ; p < numPoints ; p ++ ) { CMMPoint cmdp = cmmpoints . get ( p ) ; for ( int hc = 0 ; hc < numGTClusters ; hc ++ ) { if ( gtClustering . get ( hc ) . getGroundTruth ( ) != cmdp . trueClass ) { if ( gtClustering . get ( hc ) . getInclusionProbability ( cmdp ) >= 1 ) { if ( ! cmdp . isNoise ( ) ) pointErrorByModel ++ ; else noiseErrorByModel ++ ; break ; } } } } if ( debug ) System . out . println ( "Error by model: noise " + noiseErrorByModel + " point " + pointErrorByModel ) ; return 1 - ( ( pointErrorByModel + noiseErrorByModel ) / ( double ) numPoints ) ; }
Calculates the relative number of errors being caused by the underlying cluster model