It is not an easy answer, but there are certain guidelines Which machine learning algorithm should I use? - The SAS Data Science Blog