A Self-Adaptive Local Metric Learning Method for Classification