The rise of internet and mobile technologies (such as smartphones) provide a harness of data and an opportunity to learn about peoples' states, behavior, and context in regard to several application areas such as health. Eating behavior is an area that can benefit from the development of effective e-coaching applications which utilize psychological theories and data science techniques. In this paper, we propose a framework of how machine learning techniques can effectively be used in order to fully exploit data collected from a mobile application ("Think Slim") which is designed to assess eating behavior using experience sampling methods. The overall goal is to analyze individual states of a person status (emotions, location, activity, etc.) and assess their impact on unhealthy eating. Building on data collected from different participants, a classification algorithm (decision tree tailored to longitudinal data) is used to warn people prior to a possible unhealthy eating event and a clustering algorithm (hierarchical agglomerative clustering) is used for profiling the participants and generalize for new users of the application. Finally, a framework to offer feedback via adaptive messages (intervention) and recommendations prior to possible unhealthy eating events is presented. Results from applying our methods reveal that participants can be clustered to six robust groups based on their eating behavior and that there are specific rules that discriminate which conditions lead to healthy versus unhealthy eating. Consequently, these rules can be utilized to provide adaptive semi-tailored feedback to users who, through this method, are assisted in learning under which conditions are more prone to unhealthy eating. Effectiveness of the approach is confirmed by observing a decreasing trend in rule activation towards the end of intervention period.