Automated detection of puffing and smoking with wrist accelerometers