To refine the cluster center assignments, and ensure that the "center" of each cluster is truly equidistant from all assigned points, a k-medoids algorithm known as Partitioning Chapter around Medoids (PAM) is used. PAM proceeds by iterating through each cluster and choosing a new center from one of the currently assigned points. All points across all states are then reassigned based on this new proposed cluster center. From this proposed center, a "cost" is calculated (i.e. the sum of distances from each point to their respective center), and the proposed center placement is accepted if the cost is minimized. Once states are discretized, clustered, assigned across a simulation trajectory, the transition probability matrix is estimated. As mentioned above, the matrix of transitions between states is counted based on some lag time τ .