Cancer survival prediction usually depends on a clinically useful classification scheme. Grouping in cancer datasets is needed for this classification process [1]. Partitioning Around Medoids (PAM) is a classical clustering algorithm that is often used to group cancer data. PAM is known to be an NP-hard optimization problem and its practical application is often tackled with heuristic methods [2]. However, many heuristic PAM algorithms may converge to local minimums that adversely affect the quality of grouping results. It is therefore desirable to devise an algorithm to overcome this limitation. In this paper, we demonstrate that simulated annealing (SA) is an effective method for obtaining or approaching to a global optimum. First, we present a grouping algorithm for cancer data, and then optimize the grouping quality of PAM with SA. The experimental results show that the Simulated Annealing PAM (SA-PAM) algorithm is always capable of finding a global minimum or closer approximation to the global minimum than the standard PAM algorithm.