Here's how a computer knows if you're heading for a breakup