Human Activity Recognition on Smartphones Using a Multiclass Hardware-Friendly Support Vector Machine