Quantifying nanoscale forces using machine learning in dynamic atomic force microscopy