Smartphone-based recognition of states and state changes in bipolar disorder patients