Impacts and sources of potential toxic elements on water quality and optimizing machine learning models for sustainable management