This is the code to implement the algorithms in paper "Twin Learning for Similarity and Clustering: A Unified Kernel Approach, Zhao Kang; Chong Peng; Qiang Cheng, AAAI-17." Please contact Zhao Kang if you have any question. An example data can be downloaded from https://www.dropbox.com/sh/z6knmvidpfhz5le/AABfizEur-U3OiwmtKHNAB8Ra?dl=0