1. A method for global-to-local metric learning for classification and recognition, the method comprising: in response to a set of hierarchically clustered points {x i , I=1. .. N}, iteratively performing, by a processor, following operations: performing a global metric learning operation on the set of points to estimate a global metric, wherein the set of hierarchically clustered points is represented—using a tree structure constructed with a clustering algorithm at each level, for each of the points {x i , I=1. .. N}, performing a transformation using a corresponding transformation matrix to generate transformed points {y i,j =π k=0 i−1 A i−1,j /Kx i,j }, wherein K represents a number of clusters, wherein A i,j a transformation matrix, and clustering, using a clustering algorithm, the transformed points to generate a metric tree, wherein the global metric learning operation and transformation are performed until a termination criterion is satisfied, which is one of a maximum height in the metric tree, a minimal variance of data points in the metric tree, and a minimum number of data points the metric tree; and using the metric tree to evaluate an image for pattern recognition.