ADAPTIVE USER-DEFINED SIMILARITY MEASURE