Action Recognition and Prediction with Applications to Medical Diagnosis and Daily Living