The rapid growth of the Internet of Things (IoT) has had a major impact on our daily lives, providing a variety of innovative solutions. However, IoT- connected devices require longer battery life, wide coverage, and low deployment costs. The main challenge in LoRa networks is selecting the optimal Spreading Factor (SF) and appropriate Power that affect network performance, coverage, data rate, and energy consumption.
To address these challenges, machine learning offers a promising solution. Machine learning models can analyze data, recognize patterns, and make informed decisions to select the best SF and Power values based on various conditions. This study focuses on developing a machine learning model to optimize SF and Power selection using real-world data from rice fields in Banyumas, Central Java, Indonesia. This study evaluates several classification algorithms, including k-NN, Random Forest, and Decision Tree, to determine the most effective model for SF assignment and Power usage in LoRa netw