Constraining Effective Field Theories with Machine Learning