Scanning Probe Microscopy (SPM) based techniques probe material properties over micrometers wide regions with nanoscale resolution, ultimately resulting in investigation of mesoscale functionalities. Among SPM techniques, piezoresponse force microscopy (PFM) is a highly effective tool in exploring polarization switching in ferroelectric materials. However, its signal is also sensitive to sample-dependent electrostatic and chemo-electromechanical changes. Literature reports have often concentrated on the evaluation of the Off-field piezoresponse, compared to On-field piezoresponse, based on the latter’s increased sensitivity to non-ferroelectric contributions. Using machine learning approaches incorporating both Off- and On-field piezoresponse response as well as Off-field resonance frequency to maximize information, we investigate switching piezoresponse in a defect-rich Pb(Zr,Ti)O3 thin film. As expected, one major contributor to the piezoresponse is mostly ferroelectric, coupled with electrostatic phenomena during On-field measurements. A second component is electrostatic in nature, while a third component is likely due to a superposition of multiple non-ferroelectric processes. The proposed approach will enable deeper understanding of switching phenomena in weakly ferroelectric samples and materials with large chemo-electromechanical response.