Abstract-The software defined networking (SDN) allows separating control and data plane, which provides better network management and higher utilization for data center network. Among these topical applications in SDN, such as traffic engineering, QoS and network management, there is significant interest on classifying the flows and predict future traffic. Classification plays an important role in SDN, especially for elephant flow detection. However, how to efficiently detect all kinds of flows with low cost still remains a challenge task in current researches. To address this issue, in this paper, we propose to introduce cost-sensitive learning method to define a real-time elephant flow detection strategy and the subsequent metric in flow detection. Then we apply our strategy to train and evaluate cost-sensitive decision trees in SDN. Extensive experiments on different settings and data sets have been performed, showing that our strategy is good at detecting elephant flow with high detection rates and low overhead.