The study of user behavior based on his/her interactions with a system is widely extended over several fields of research. Often, it is useful to have an underlying model to generate behavioral predictions, allowing the system to automatically adapt to the user and to detect deviations from an expected behavior. In this work, we develop a general method to create, select and validate a Hidden Semi-Markov Model (HSMM) to predict behavior in interactive environments, based on previously seen interactions. The method is completely data-driven, unrestricted by any prior knowledge of the model structure, and easy to automate once some parameters has been adjusted. To test the proposed method, a multi-UAV mission simulator has been used, obtaining a model able to perform adequate predictions in terms of quality and time.