A Geometric Theory of Feature Selection and Distance-Based Measures