Grouping and dimensionality reduction by locally linear embedding