Nearest centroid classifier