Barium stars as tracers of s-process nucleosynthesis in AGB stars II. Using machine learning techniques on 169 stars