Anticipating manic and depressive transitions in patients with bipolar disorder using early warning signals