Accurate prediction of peptide fragment ion mass spectra is one of the critical factors to guarantee confident peptide identification by protein sequence database search in bottom-up proteomics. In an attempt to accurately and comprehensively predict this type of mass spectra, a framework named MS(2)PBPI is proposed. MS(2)PBPI first extracts fragment ions from large-scale MS/MS spectra data sets according to the peptide fragmentation pathways and uses binary trees to divide the obtained bulky data into tens to more than 1000 regions. For each adequate region, stochastic gradient boosting tree regression model is constructed. By constructing hundreds of these models, MS(2)PBPI is able to predict MS/MS spectra for unmodified and modified peptides with reasonable accuracy. Moreover, high consistency between predicted and experimental MS/MS spectra derived from different ion trap instruments with low and high resolving power is achieved. MS(2)PBPI outperforms existing algorithms MassAnalyzer and PeptideART.