User clustering general algorithm without implementation