Contextual Thinking for Inference and Prediction of Daily Activities by Mining Smartphone Data