Abstract : In order to classify time series, many machine learning algorithms such as the kNN classifer require a metric. We propose in this work a framework to learn a combination of multiple metrics for a robust kNN classifier. This combined metric includes both temporal (value and behavior) and frequential components. By introducing the concept of pairwise space, the combination function is learned in this new space through a "large margin" optimization process. The efficiency of the learned metric is compared to the major alternative metrics on large public datasets.