Protocols such as TCP depend on loss detection and recovery algorithms to provide a reliable data delivery service. TCP detects loss events using either retransmission timeout or receipt of duplicate acknowledgements. Since, TCP does not have any explicit knowledge about the cause of packet loss, it always treats it as a congestion indication and then adjusts sending rate conservatively to maintain fairness. This often compromises achievable throughput under wireless loss conditions. This problem can be solved by making the TCP source intelligent so that on detecting a packet loss, it will be able to distinguish what type of loss it is (a Congestion loss or a Wireless loss) and react accordingly. This paper presents an online-learning solution to discriminate wireless loss from congestion loss solely using the information available at the TCP layer and at the source only. Initial results obtained from a simulation based study show that the proposed algorithm which combines K-Means clustering approach together with heuristics is capable of classifying loss types to a higher degree of accuracy under various loss scenarios and provides significant performance improvements under high wireless loss conditions.