Improving k-nn search and subspace clustering based on local intrinsic dimensionality