LoRa (Long Range), a wireless communication technology for low power wide area networks (LPWANs), enables a wide range of IoT applications and inter-device communication, due to its openness and flexible network deployment. In the actual deployment and operation of LoRa networks, the static link transmission scheme does not make full use of the channel resources in the time-varying channel environment, resulting in a poor network performance. In this paper, we propose a more effective adaptive data rate (ADR) algorithm for low-cost gateways, we firstly analyze the impact of the different hardware parameters (RSSI, SNR) on the link quality and classify the link quality using the fuzzy support vector machine (FSVM). Secondly, we establish an end device (ED) throughput model and energy consumption model and design different adaptive rate algorithms, according to the different link quality considering both the link-level performance and the MAC layer performance. The proposed algorithm uses machine learning to classify the link quality, which can accurately classify the link quality using a small amount of data, compared to other adaptive rate algorithms, and the link parameter adaptation algorithm can maximize the throughput while ensuring the link stability, by considering the link-level performance and the MAC layer performance, compared to other algorithms. The results show that it outperforms the standard LoRaWAN ADR algorithm in both the single ED and the multi ED scenarios, in terms of the packets reception rate (PRR) and the network throughput. Compared to the LoRaWAN ADR in 32 multi-ED scenarios, the proposed algorithm improves the throughput by 34.12% and packets the reception rate by 26%, significantly improving the network throughput and the packets reception rate.