It doesn't matter what clustering algorithm it is. Let's say I have data in a 2 dimensional (X Y) space. I want to tune (select parameters in) my clustering algorithm so that I minimize the variance in each cluster, and maximize the number of points in the cluster. Basically, I want a tight fit.
For example, having only 2 items (which are very close to each other) in each cluster is bad. Even though the variance is small, the count is low. At the same time, having many items in each cluster is good, but it may have a larger variance.
I'm not sure how to make a scoring function where I somehow incorporate the covariance / mean of each cluster created, and the amount of items in each cluster.