Applying machine learning to determine impact parameter in nuclear physics experiments