resource based kmedoid