Improving Activity Recognition by Segmental Pattern Mining