Learning and Recognizing The Hierarchical and Sequential Structure of Human Activities