As astronomical data sets become too large for traditional analysis approaches, more machine-learning algorithms are employed in astronomy. A wealth of light variation data have been accumulated, which provide rich samples for astronomers to study variable stars. Facing the challenge of big data, this article takes the classification of variable and transient objects observed by the Zwicky Transient Facility (ZTF) as the main goal, and a self-paced ensemble (SPE) imbalanced-learning classifier is constructed to separate different classes. The performance of the classifier reveals that SPE is better than a traditional imbalanced-learning algorithm for the minority classes. In our work, the SPE classifier is satisfactory for young stellar objects (YSOs), and the completeness (recall) of YSOs is enhanced to 91%. As a result, 868,371 ZTF sources are classified into 15 classes by this classifier, which contains 8210 YSO candidates (YSO_prob>=0.70). In order to further identify YSO candidates, these candidates are crossmatched with LAMOST DR9. Finally, 833 candidates are observed by LAMOST, among them 379 objects that are known YSOs in SIMBAD. For the remaining objects with good-quality LAMOST spectra, we visually check their spectral characteristics, and 238 objects are newly confirmed YSOs. These newfound YSOs supplement the present YSO sample, and other YSO candidates may be used for follow-up observation, which is useful for characterizing YSOs, finding more YSOs, and then giving a better stellar evolution model in the future. The classified ZTF sources by SPE provide reference to the study of variables and transients.