Natural disasters (e.g. floods, landslides and tsunamis) are phenomena that occur in several countries and cause a great deal of damage, as well as a serious loss of life and materials. Although very often these events cannot be avoided, their environments can be monitored and thus predictions can be made about their likely occurrence so that their effects can be mitigated. One feasible way of carrying out this monitoring is through the use of wireless sensor networks (WSNs) since these disasters usually occur in hostile environments where there is a lack of adequate infrastructure. This article examines the most recent results obtained from the use of machine learning techniques (ML) and adopts a distributed approach to predict floods using a WSN deployed in Brazil to monitor urban rivers. It also conducts a comparative analysis of ML techniques (e.g. Artificial Neural Networks and Support Vector Machines) for the task of flood prediction and discusses the results obtained from each type of technique explored so far. Finally, in the discussion of the results, a suggestion is made about how to improve accuracy in forecasting floods by adopting a distributed approach, which is based on allying computing intelligence with WSNs.