Distance Metric-based Learning Algorithm