Study identifies pitfalls, solutions for using AI to predict