# A Machine Learning Approach to Simulation of Mallard Movements
###### Abstract
Several widely used privacy-preserving techniques include a homomorphic encryption method [25], secure multi-party computation for federated learning [26], and an innovative approach known as the efficient and privacy-preserving neural network (EPNN) [27]. These methods were not directly applicable to our mallard data. Consequently, we opted for using plaintext due to its human-readable and easily accessible nature as well as for better understanding and interpreting data. From an authority point of view (such as the Swedish Environmental Protection Agency (in Swedish, \"Naturvardsverket\", [[https://www.naturvardsverket.se/en/](https://www.naturvardsverket.se/en/)]([https://www.naturvardsverket.se/en/](https://www.naturvardsverket.se/en/)) (accessed on 28 January 2024))), it is important to have appropriate knowledge about current wildlife behavior and future behavior(s). Simulation models as a result of this study were further progressed, looking at further aspects of bird lives. Possible behavioral changes can be a result of possible climate changes. Furthermore, a time-series analysis was conducted on a limited part of the available data to investigate the movement behavior of individual mallards. To gain knowledge and understanding, a review was conducted on previous work regarding geese behavior patterns presented in a report commissioned by Swedish researchers in biology and ecology. They noticed geese had increased in numbers and possibly changed their migration patterns. The report [28] described geese and swan habitats, and how these herbivores affect agriculture by grazing crops. With a change in the climate, it is noticed that there is a change in the movement of these birds that otherwise would leave southern Sweden but now stay in or nearby neighboring countries [29]. As pointed out by [30; 31], crop damage is becoming more frequent, and particularly with climate change shifting population ranges, there is a need to better understand the habitat selection processes of different goose species to be able to inform authorities and thereby improve damage mitigation. The value of this study and other studies should be seen in this context. Possible simulations of the mallards in question are of interest, and these gained experiences point further toward possible future ML-based simulation studies of geese. The aim is to provide tools for studying the effects of changed animal behavior and to meet and communicate these problems that these possibly can entail. The study of this contribution is based on previous work being the starting point of investigating how wild and farmed mallards moved across local areas in southern Sweden [32]. The main purpose was to study differences in movement patterns between farmed and wild mallards, focusing on how the populations were affected. The results showed how wild mallards generally moved over larger distances in comparison to farmed ones. Data were collected from ringed mallards, where the rings carried sensors providing positions and time. The sensors occasionally seemed to produce values considered as outliers (areas of movements that are too large), with a need for either excluding data points or averaging them out. Studies indicate that straightforward machine learning (ML) techniques are not entirely effective in replicating mallard behavior. This ineffectiveness is primarily due to the biased nature of mallard data, which are often imbalanced and include non-continuous time stamps. Typically, an ML model encompassing an entire dataset risks becoming too generalized, treating natural deviations as outliers. To address this issue, a two-step approach was proposed. The first step involved a thorough analysis of the dataset to gain a deeper understanding of the natural variations. Following this, the second step was to move away from a uniform ML model and instead develop specialized ML models tailored to the distinct characteristics of the data.