Online machine learning (ML) is often used in selfadaptive systems to strengthen the adaptation mechanism and improve the system utility. Despite such benefits, applying online ML for self-adaptation can be challenging, and not many papers report its limitations.
Recently, we experimented with applying online ML for self-adaptation of a smart farming scenario and we had faced several unexpected difficulties - traps - that, to our knowledge, are not discussed enough in the community. In this paper, we report our experience with these traps.
Specifically, we discuss several traps that relate to the specification and online training of the ML-based estimators, their impact on self-adaptation, and the approach used to evaluate the estimators. Our overview of these traps provides a list of lessons learned, which can serve as guidance for other researchers and practitioners when applying online ML for self-adaptation.