Researchers develop way of using machine learning to aid mental health diagnoses