Human behavior modeling enables many applications for smart cities, smart homes, mobile phones and other domains. We present a hierarchical hidden Markov model for human activity recognition that uses semi-supervised learning to automatically learn the model parameters using only labeled data of the top-layer of the hierarchy. This significantly reduces the annotation requirements for such a model and simplifies the design of such a model, since the inherent structure of the activity is automatically learned from data. The design consideration that remains is the number of states used for representing the actions that an activity consists of. Using multiple real world datasets we show that the same model works both for the recognition of activities of daily living in a smart home and for recognizing office activities from audio data. We show how a variable number of action states per activity can result in a significant increase in performance over using a fixed number per activity. Finally, we show how the use of Bayesian and Akaike information criterion results in models using a sub-optimal set of action states, since a model using intuitively chosen set states is able to outperform them.