  Radio, sub-millimiter and millimeter ground-based telescopes are powerful
instruments for studying the gas and dust-rich regions of the Universe that are
invisible at optical wavelengths, but the pointing accuracy is crucial for
obtaining high-quality data. Pointing errors are small deviations of the
telescope's orientation from its desired direction. The telescopes use linear
regression pointing models to correct for these errors, taking into account
various factors such as weather conditions, telescope mechanical structure, and
the target's position in the sky. However, residual pointing errors can still
occur due to factors that are hard to model accurately, such as thermal and
gravitational deformation and environmental conditions like humidity and wind.
Here we present a proof-of-concept for reducing pointing error for the Atacama
Pathfinder EXperiment (APEX) telescope in the high-altitude Atacama Desert in
Chile based on machine learning. Using historic pointing data from 2022, we
trained eXtreme Gradient Boosting (XGBoost) models that reduced the
root-mean-square errors (RMSE) for azimuth and elevation (horizontal and
vertical angle) pointing corrections by 4.3% and 9.5%, respectively, on
hold-out test data. Our results will inform operations of current and future
facilities such as the next-generation Atacama Large Aperture Submillimeter
Telescope (AtLAST).
