Intrinsic dimension estimation for locally undersampled data