diff --git a/Chapter06/evaluating/example2/myprogram.go b/Chapter06/evaluating/example2/myprogram.go index 4b55e70..1b6f3ac 100644 --- a/Chapter06/evaluating/example2/myprogram.go +++ b/Chapter06/evaluating/example2/myprogram.go @@ -135,8 +135,9 @@ func main() { // Add to the average silhouette coefficient. if a > b { silhouette += ((b - a) / a) / float64(len(labels)) + } else { + silhouette += ((b - a) / b) / float64(len(labels)) } - silhouette += ((b - a) / b) / float64(len(labels)) } // Output the final average silhouette coeffcient to stdout.