A guide to constraining effective field theories with machine learning