To determine an optimal value of k, we take the following three steps. First, we run the clustering algorithm on different k values. This produces different clustering schemes for the same set of bit-patterns. Second, for each clustering scheme, we compute its entropy. Let c1, ..., cl be the l clusters after clustering the set of N bit-patterns. Furthermore, each cluster ci (1 ≤ i ≤ l) has an individual entropy Hi and contains Ni elements, then the total entropy of this clustering is given by the following formula: H=∑i=1kHi∗(Ni/N) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGibascqGH9aqpdaaeWaqaaiabdIeainaaBaaaleaacqWGPbqAaeqaaOGaey4fIOIaeiikaGIaemOta40aaSbaaSqaaiabdMgaPbqabaGccqGGVaWlcqWGobGtcqGGPaqkaSqaaiabdMgaPjabg2da9iabigdaXaqaaiabdUgaRbqdcqGHris5aaaa@3F89@ The entropy of each individual cluster, i.e., Hi , is computed by summing up the entropy of each of the six bit-pattern attributes such as its height and width. For an attribute, we compute its entropy in a cluster according to the procedure explained by Shannon [23]. In the third and final step, we plot the entropy against the number of clusters, i.e., k, and choose a value k where the entropy plot begins to show a linear trend. For the BBA5 folding data, this clustering step groups the 352 bit-patterns into 10 clusters (or types). As for the GSGS data, 12 clusters are identified.