Routing in sensor networks maintains information on neighbor states and potentially many other factors in order to make informed decisions. Challenges arise both in (a) performing accurate and adaptive information discovery and (b) processing/analyzing the gathered data to extract useful features and correlations. In this paper, we explore using supervised learning techniques to address such challenges in wireless sensor networks. Machine learning has been very effective in discovering relations between attributes and extracting knowledge and patterns using a large corpus of samples. As a case study, we use link quality prediction to demonstrate the effectiveness of our approach. For this purpose, we present MetricMap, a link-quality aware collection protocol atop MintRoute that derives link quality information using knowledge acquired from a training phase. Our approach allows MetricMap to maintain efficient routing in situations where traditional approaches fail. Evaluation on a 30-node sensor network testbed shows that MetricMap can achieve up to 300% improvement on data delivery rate in a high data-rate application, with no negative impact on other performance metrics, such as data latency. Our approach is based on real-world measurement and provides a new perspective to routing optimizations in wireless sensor networks.