When children learn Tang poetry, differences in their mastery level of Tang poetry (MLTP) are observed. This difference may be related to children’s age, learning habits, and psychological factors such as internal learning motivation (ILM), external learning motivation (ELM), parent-oriented motivation (POM), children’s sense of agency (SoA), etc. We explored children’s MLTP as a binary mathematical problem in this study. Firstly, the MLTP was quantified by histogram analysis, and the binary classification learning scene was constructed. Then through correlation analysis, the characteristics related to MLTP were determined. The experimental results showed that children’s MLTP was positively correlated with children’s age, ILM, ELM, SoA, POM, and other factors, but not significantly correlated with gender and review time. Finally, A CART decision tree algorithm and Random Forest ensemble learning algorithm were used to construct the two classification models of MLTP. The models’ accuracies were 74.5 and 77.8%, respectively. The CART decision tree model showed excellent interpretability to portray the characteristics of children with better MLTP, which provides a reference for teaching.