Landslides have the potential to cause significant property damage as well as fatalities. Landslides are identified by real-time heuristic data analysis acquired using wireless sensor networks (WSNs) in changing environments. People can abandon dangerous locations earlier when landslides are forecasted. In this paper, the early warning prediction system developed using machine learning; Artificial Neural Networks (ANNs) provide precise predictions. The weight coefficients of ANN can be adjusted exactly enough by network functional training. In the case of unbalanced data distribution, the proposed ANN model is unable to learn the sample data pattern. This results in incorrect prediction and therefore, a switching method is utilized to switch between alternative predictors based on the current environmental state. Furthermore, the proposed model has been developed to forecast and compensate for errors during the prediction phase. Thus, the proposed model can enhance precise prediction, and an early warning prediction system of landslides can issue warnings 44.2 minutes before a landslide occurrence.