Genetic algorithm-based random forest optimization-based visual analysis method for admission prediction of Chinese school examinations
By optimizing the random forest model with genetic algorithms and using multi-view collaborative technology, we solved the time-consuming parameter tuning and lack of interpretability issues of the high school entrance examination admission prediction model. We achieved efficient and visual analysis of the high school entrance examination admission prediction, and supported personalized college entrance guidance and resource optimization.
Patent Information
- Application Number
- CN202510912861.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-26
AI Technical Summary
The existing high school entrance examination admission prediction model has problems such as time-consuming parameter tuning, insufficient interpretability and insufficient visual analysis. It is difficult to reflect the dynamic matching mechanism of "score-volunteer-admission" and lacks personalized college entrance guidance support.
Genetic algorithms are used to optimize the random forest model, and interactive visual analysis of the model's prediction process and data is achieved through multi-view collaboration. Model explanation views and student prediction result views are constructed to provide global model explanation and individual prediction attribution analysis.
It improves the efficiency and interpretability of high school entrance exam admission predictions, can accurately locate abnormal students, optimize enrollment strategies, provide educators with data-driven visualization solutions, and support personalized enrollment guidance and resource allocation.
Smart Images

Figure CN120707354A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual analysis, and specifically provides a visual analysis method for predicting high school entrance examination admission based on genetic algorithm optimized random forest. Background Art
[0002] The high school entrance exam, a crucial milestone in the basic education system, serves as a juncture in the assessment process. It serves not only as a quantitative measure of students' academic performance but also, through its application and admission process, directly influences their educational paths and future development. Accurately predicting student admissions destinations not only provides personalized guidance and helps students plan their academic goals and college entrance strategies, but also provides crucial data support for optimizing junior high school entrance exam preparation, predicting high school enrollment structure, and balancing resource allocation for educational administration departments. In existing research, the random forest algorithm has been widely used in educational prediction due to its robustness and predictive accuracy. However, traditional prediction models generally suffer from three limitations: First, they focus solely on academic performance data and ignore the impact of application behavior on admissions outcomes, making them unable to reflect the dynamic matching mechanism of "score-application-admission"; second, they rely on manual tuning of hyperparameters, a time-consuming process that is susceptible to subjective experience; and third, the black-box nature of these models leads to limited interpretability, making it difficult to provide students with a specific understanding of the admissions criteria and gaining the trust of educational decision-makers.
[0003] Visualization technology offers a new path to addressing these challenges. Existing research has shown that visualization can effectively enhance the transparency of model decisions and play a key role in educational data analysis. Examples include using radar charts to compare the effectiveness of blended learning, composite Sankey diagrams to present student enrollment trends, tree diagrams to analyze regional educational resource comparisons, and heat maps to identify weak subjects. However, existing visualization research often focuses on macro-analysis at the regional or school level, lacking detailed insights into individual students. It lacks multidimensional data correlation displays from junior high school to high school (such as the grade distribution of students from a single school, the score ratios for each subject within the school, and the characteristics of the admission rankings). Furthermore, it lacks an interpretable connection between model predictions and student characteristics, making it difficult to meet the practical needs of adjusting student application strategies in personalized admission guidance. Summary of the Invention
[0004] The purpose of this invention is to address the problems of low efficiency, unexplainable model and insufficient visual analysis in the existing technology in predicting high school entrance examination admissions, and to provide a visual analysis method for predicting high school entrance examination admissions based on genetic algorithm optimized random forest. This method realizes interactive visual analysis of the prediction process of the genetic algorithm optimized random forest model and high school entrance examination scores, volunteer application and other data through multi-view collaboration.
[0005] In order to solve the above problems, the present invention adopts the following technical solutions:
[0006] The present invention is a visual analysis method for predicting high school entrance examination admission based on genetic algorithm optimized random forest, which is characterized by the following specific steps:
[0007] A. Obtain student scores, volunteer applications, junior high school enrollment, and high school admission data from the high school entrance exam dataset, as well as student junior high school enrollment, scores, and simulated volunteer application data from the high school entrance exam mock exam dataset;
[0008] B. Use genetic algorithms to automatically adjust the parameters of random forests and extract decision rules;
[0009] C. Use the trained model to predict student admissions, including statistics on the number of students in each junior and senior high school segment, student mobility between junior and senior high schools, score rates for each subject, and volunteer admissions.
[0010] D. Address the "black box" problem of the random forest model through the model interpretation view, providing global model interpretation and individual prediction attribution analysis;
[0011] E. Through the student prediction results view, multi-dimensional data such as students' test scores, volunteer applications, and admission predictions are presented in a table format;
[0012] F. Support individual students’ real information query, editing and personalized guidance through student lists.
[0013] The above-mentioned present invention is based on the visual analysis method for predicting high school entrance examination admission based on genetic algorithm optimization of random forest, and its further preferred technical solution is: the step (A) described in obtaining the student scores, volunteer applications, junior high schools and admitted high schools in the high school entrance examination data set and the student junior high schools, scores and simulated volunteer application data in the high school entrance examination simulation data set, and its specific steps are as follows: for the regional high school entrance examination data set, collect all students' test scores, junior high schools, volunteer application details and admitted high schools, and at the same time obtain the student junior high schools, scores and simulated volunteer application data in the high school entrance examination simulation data set to provide a comprehensive and accurate data foundation for subsequent data processing, model training and visual analysis.
[0014] The present invention described above is based on a visual analysis method for predicting high school entrance examination admissions based on a genetic algorithm-optimized random forest. A further preferred technical solution is: the use of a genetic algorithm as described in step (B) to automatically adjust the parameters of the random forest and extract decision rules, and the specific steps are as follows: first, initialize the key parameters of the random forest, including the number of trees, maximum depth, maximum number of features, etc.; then initialize the genetic algorithm population, with each individual representing a set of random forest parameters; then evaluate the individual fitness through stratified K-fold cross-validation and balanced accuracy, select parents using the tournament selection method, perform two-point crossover and mutation operations to generate new individuals, update the population and repeat the iteration until the maximum number of iterations is reached or the fitness value no longer increases, obtain the optimal parameters to construct the final random forest model; finally, restore the classification features to their original form, convert the binary judgment conditions of the one-hot encoding into interpretable semantic rules, process the decision path of each decision tree in the random forest, convert it into a rule vector, calculate the upper and lower limits of the numerical features and determine the value range of the classification features, and complete the decision rule extraction.
[0015] The above-mentioned present invention is based on the visual analysis method for predicting high school entrance examination admission based on genetic algorithm optimization of random forest. Its further preferred technical solution is: the use of the trained model described in step (C) to predict student admission, and statistics the number of students in each segment of junior high and high school, the flow of students between junior high and high school, the score rate of each subject, and the voluntary admission situation. The specific steps are as follows: the random forest model optimized by the genetic algorithm is applied to the high school entrance examination data set to predict the admission destination of each student; at the same time, a multi-dimensional statistical analysis of the data is performed, including dividing the number of students in each segment of junior high and high school according to the score range, sorting out the student flow path and scale from junior high school to high school, calculating the score rate of each subject to reflect the subject strengths and weaknesses of different schools and student groups, and statistically analyzing the correspondence between voluntary application and admission results, providing multi-dimensional data support for subsequent visual analysis, and helping to discover the key influencing factors and potential laws in the "score-voluntary-admission" process.
[0016] The present invention described above is based on a visual analysis method for predicting high school entrance examination admissions based on a genetic algorithm-optimized random forest. A further preferred technical solution is: constructing a model explanation view as described in step (D), and the specific steps are as follows: constructing a basic matrix structure, wherein rows represent decision rules in a random forest, columns represent features, and cells encode the value range of features in the rules. Numerical features use the position and length of color blocks to represent intervals, and categorical features assign independent areas to each category and fill them with corresponding colors; designing interactive functions, global explanation interactions support grouping by prediction category, sorting in descending order by rule coverage or prediction probability, setting coverage threshold filtering rules, and sorting columns by feature importance. Individual prediction attribution analysis supports instance trigger rule highlighting, feature contribution sorting, and real-time feedback, solving the "black box" problem of the model and providing global model explanation and individual prediction attribution analysis.
[0017] The present invention described above is based on a visual analysis method for predicting high school entrance examination admissions based on a genetic algorithm-optimized random forest. A further preferred technical solution is: constructing a student prediction result view as described in step (E), and the specific steps are as follows: designing a table structure layout, with junior high schools as rows and high schools as columns, and adding a bar chart of the number of students in each segment of the school on the periphery; setting the calculation layout of the elements in the table, and providing three information display modes: "student", "score" and "admissionstatistics". In the "student" mode, the "group" mode reflects the scale of student mobility through rectangular area, the "stu" mode arranges in descending order by grades and distinguishes high and low grades through transparency, marking abnormal students, the "score" mode uses a pie chart or a ring chart to display the subject score, and the "admissionstatistics" mode uses a line chart to display the trend of the number of voluntary admissions; realizing dynamic interactive functions, supporting row and column merging, clicking on data points to link the model explanation view to display student detailed data, hovering the mouse over the chart to enlarge the display and display detailed information, helping users quickly understand students' academic status, school admission trends and abnormal situations.
[0018] The present invention described above is based on a visual analysis method for predicting high school entrance examination admissions based on genetic algorithm optimization of random forests, and its further preferred technical solution is: constructing a student list as described in step (F), and its specific steps are as follows: displaying the real information of individual students, including grades, volunteers, etc., highlighting abnormal students, and facilitating the accurate positioning of those who need key guidance; supporting the editing of student grades and volunteer information, triggering real-time prediction after modifying the data, the system automatically re-runs the model and updates the prediction results, and at the same time, triggers the model explanation view, dynamically displays the newly triggered rules due to data adjustments and the admission probability of each school, and provides students with personalized guidance and academic strategy optimization support.
[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: the method described in the present invention, in view of the time-consuming parameter tuning and insufficient interpretability of the traditional enrollment prediction model and the need for multi-dimensional analysis of educational data, constructs a random forest model optimized by genetic algorithms and a multi-view visualization system. The complex decision rules are converted into an interactive matrix through the model interpretation view, and combined with the junior and senior high school composite table and grade distribution analysis of the prediction result view, the visualization problem of the "score-volunteer-admission" dynamic matching mechanism is solved. Using this system, educators can accurately locate abnormal students (such as unreasonable volunteer filling or prediction error groups), edit student data in real time and trigger model dynamic prediction, and simultaneously view the newly triggered decision rules to efficiently verify the rationality of enrollment strategies; at the same time, through multi-dimensional data encoding such as subject score rate and volunteer admission ranking, in-depth analysis of school teaching quality differences, optimization of test preparation direction, and provide a data-driven visualization solution for scientific guidance of high school entrance examination planning and balanced allocation of educational resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of the method of the present invention;
[0021] Figure 2 The global explanation of the model constructed by the method of the present invention and the individual explanation view of the student instance;
[0022] Figure 3 The prediction result view and view element design diagram constructed by the method of the present invention;
[0023] Figure 4 The student list view constructed by the method of the present invention;
[0024] Figure 5 The overall system constructed for the method of the present invention;
[0025] Figure 6 This is a diagram of the architecture of the method of the present invention;
[0026] Figure 7 Schematic diagram of the modules of the method of the present invention. DETAILED DESCRIPTION
[0027] The implementation process of the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] Example 1, with reference to Figure 1 -7. A visual analysis method for predicting high school entrance exam admission based on genetic algorithm-optimized random forest. The specific steps are as follows:
[0029] A. Obtain student scores, volunteer applications, junior high school enrollment, and high school admission data from the high school entrance exam dataset, as well as student junior high school enrollment, scores, and simulated volunteer application data from the high school entrance exam mock exam dataset;
[0030] B. Automatically tune the parameters of the random forest using a genetic algorithm and extract decision rules;
[0031] C. Use the trained model to predict student admissions, and count the number of students in each junior and senior high school segment, the student flow between junior and senior high schools, the scoring rates of each subject, and the volunteer admission situation;
[0032] D. Solve the "black box" problem of the random forest model through the model interpretation view, and provide global model interpretation and individual prediction attribution analysis;
[0033] E. Present the multi-dimensional data of students' exam scores, volunteer applications, and admission predictions in tabular form by constructing a student prediction result view;
[0034] F. Support the query, editing, and personalized guidance of individual student real information by constructing a student list.
[0035] When automatically tuning the parameters of the random forest and extracting decision rules using a genetic algorithm as described in step B, first initialize the random forest; the random forest consists of multiple decision trees, and each tree outputs a classification result after inputting the samples; during the node splitting process of each decision tree, randomly select m try < M features from the total number of features M as candidate splitting features to reduce the correlation between trees; use the Gini coefficient to evaluate the splitting quality, and the formula is:
[0036]
[0037] where D is the node sample set, C is the number of classes, and |D c | is the number of samples in class C; the Gini gain ΔGini after splitting is:
[0038]
[0039] where D i is the sample set of the child nodes after splitting, and split by selecting the feature and threshold that maximize ΔGini; key parameters such as the number of trees n_estimators, the maximum depth max_depth, the maximum number of features max_features, the minimum number of samples per leaf node min_samples_leaf, and the maximum number of leaf nodes max_leaf_nodes need to be set during initialization;
[0040] Then initialize the genetic algorithm population, and each individual represents a set of random forest parameters; evaluate the fitness of individuals through stratified K-fold cross-validation, and use the balanced accuracy as the metric:
[0041]
[0042] Among them, n is the number of categories, TP i is the true number of cases in the i-th category, FN i is the number of false counterexamples of category i;
[0043] Then, based on the individual fitness values, three individuals are randomly selected from the current population, and the individual with the highest fitness value is selected as the parent. The population is updated through two-point crossover and mutation operations until the termination condition is reached, the optimal parameters are obtained, and the final model is constructed. When the model is processed for classification features, the one-hot encoded features are restored to their original form.
[0044] Finally, the decision rules are extracted and the decision path p (o,d) For numerical features, the lower limit of the regular vector The calculation is as follows:
[0045]
[0046] That is, if in p (o,d) There is feature f in m And its logic For the case of ">", In these cases, θ i If this does not exist, is set as feature f in the dataset m The minimum value of the rule vector The calculation is as follows:
[0047]
[0048] That is, if in p (o,d) There is feature f in m And its logic For the case of "≤", In these cases, θ i If it does not exist, then is set as feature f in the dataset m The maximum value of
[0049] For categorical features, the discrete set F of the feature m ={a1,a2,…,a n}, when the symbol for equality judgment is “==”, the rule value is a single-element set, and when the symbol for non-equality judgment is “!=”, the rule value is the set after removing the excluded value from the entire set.
[0050] The specific steps of step C are as follows: apply the random forest model optimized by genetic algorithm to the high school entrance examination dataset to predict the admission destination of each student; at the same time, perform multi-dimensional statistical analysis on the data, including dividing the number of students in each segment of junior high and high school according to score ranges, sorting out the student flow path and scale from junior high school to high school, calculating the score rate of each subject to reflect the subject strengths and weaknesses of different schools and student groups, and statistically analyzing the correspondence between volunteer applications and admission results, providing multi-dimensional data support for subsequent visual analysis, and helping to discover the key influencing factors and potential patterns in the "score-volunteer-admission" process.
[0051] In step D, a model explanation view is constructed. The specific steps are as follows: construct a basic matrix structure, where rows represent decision rules in random forests, columns represent features, cells encode the value range of features in the rules, numerical features use the position and length of color blocks to represent intervals, and categorical features assign independent areas to each category and fill them with corresponding colors; design interactive functions, and global explanation interactions support grouping by prediction category, sorting by rule coverage or prediction probability in descending order, setting coverage threshold filtering rules, and sorting columns by feature importance. Individual prediction attribution analysis supports instance trigger rule highlighting, feature contribution sorting, and real-time feedback, solving the "black box" problem of the model and providing global model explanation and individual prediction attribution analysis.
[0052] In step E, construct the student prediction result view. The specific steps are as follows: Design the table structure layout, with junior high schools as rows and high schools as columns, and add a bar chart of the student population statistics for each school segment on the periphery; set the calculation layout of the elements in the table, providing three information display modes: "student", "score", and "admission statistics". In the "student" mode, the "group" mode uses the rectangular area to reflect the scale of student mobility. The area calculation formula is:
[0053]
[0054] Among them, MaxNum is the maximum number of students in all cells, num is the number of students in a cell, Area base is the area of the base rectangle; the "stu" mode sorts the scores in descending order and distinguishes the scores by transparency. The transparency calculation formula is:
[0055]
[0056] Among them, Opacity is the transparency of the student rectangle, Score is the student's score, MinScore is the lowest score among all students, MaxScore is the highest score among all students, Opacity maxis the maximum transparency value set; different colors are used to mark abnormal students; the "score" mode uses pie charts or ring charts to display subject scores, and uses the corresponding arc heights of different schools to compare subject score differences; the formula for calculating the arc height in the ring chart is:
[0057]
[0058] Among them, h represents the height of the school arc, S school is the school's score in the subject, S subject is the total score of the subject, and w is the width of the subject arc. The "admission statistics" mode uses a line chart to show the trend of the number of voluntary admissions. It implements dynamic interactive functions, supports row and column merging, and clicks on data points to link the model explanation view to display detailed student data. Hovering the mouse over the chart enlarges the display and displays detailed information, helping users quickly understand students' academic status, school enrollment trends, and abnormal situations.
[0059] The visual analysis method according to claim 1 is characterized in that the construction of the student list described in step F comprises the following specific steps: displaying the real information of individual students, including grades and volunteers, highlighting abnormal students, and facilitating the precise positioning of those who need key guidance; supporting the editing of student grades and volunteer information, triggering real-time prediction after data modification, the system automatically re-runs the model and updates the prediction results, and at the same time, triggering the model explanation view, dynamically displaying the newly triggered rules due to data adjustments and the admission probability of each school, providing students with personalized guidance and academic strategy optimization support.
[0060] Example 2, reference Figure 1 The visual analysis method for predicting high school entrance examination admission based on genetic algorithm optimized random forest includes the following steps:
[0061] S1: For the regional high school entrance examination dataset, we collect information on the test scores, junior high schools attended, volunteer application details, and high school admissions of all students in the region. At the same time, we obtain the junior high schools, scores, and simulated volunteer application data of students in the high school entrance examination mock exam dataset to provide a comprehensive and accurate data foundation for subsequent data processing, model training, and visualization analysis.
[0062] In this implementation, the data comes from the 2021-2024 high school entrance exam data and the 2025 high school entrance exam mock exam data for a certain region, covering a total of 20,100 students who took the high school entrance exam in previous years and 2,561 students who took the mock exam in the current year. This data includes detailed information such as student ID, total score, scores in each subject, application order (e.g., zy1-zy11 indicates schools with different application orders), junior high school name and the district and county to which it belongs, and the name of the high school where the students were admitted.
[0063] S2: Based on the principles of genetic algorithms, the key parameters of the random forest model are automatically tuned to improve the model's prediction accuracy and efficiency. At the same time, decision rules are extracted from the optimized model to provide a basis for subsequent model interpretation and visualization.
[0064] The specific steps are as follows: First, initialize the initial parameters of the random forest, including the number of trees, maximum depth, maximum number of features, etc., and set a reasonable range of parameter values. Then initialize the genetic algorithm population and randomly generate a set of initial solutions, each of which represents a set of parameters for the random forest. Then evaluate the individual fitness. For each individual in the population, use the corresponding parameters to construct a random forest model. Perform stratified K-fold cross-validation on the training set, and use balanced accuracy as the fitness metric. This metric takes into account the recall rate of each category to avoid the evaluation results being affected by the majority category. Based on the individual fitness value, the tournament selection method is used to select parents. Three individuals are randomly selected from the current population, and the individual with the highest fitness value is selected as the parent. Through two-point crossover, the biological genetic exchange process is simulated, and the gene fragments of the parents are exchanged to generate new individuals. The new individuals generated by the crossover are mutated, and certain genes of the individuals are randomly changed to increase the diversity of the population and prevent the algorithm from falling into a local optimal solution. Newly generated individuals are added to the population, replacing some of the original individuals to form a new population. The above steps are repeated until the maximum number of iterations is reached or the fitness value stops improving. At this point, the individual with the highest fitness value is selected, and its corresponding parameters become the optimized random forest model parameters. These parameters are used to construct the final random forest model. Finally, the classification features that were one-hot encoded during the training phase are restored to their original form, and the technical binary judgment conditions are converted into interpretable semantic rules. Rules are extracted from the decision paths of each decision tree in the random forest and converted into rule vectors for subsequent model interpretation and visualization.
[0065] S3: Use the trained random forest model to predict student admissions. At the same time, collect statistics on the number of students in each segment of junior high and high school, the flow of students between junior high and high schools, the score rates of each subject, and the voluntary admission situation, providing rich data support for subsequent visual analysis.
[0066] In this implementation, the model predicts each student's high school enrollment, and the number of students in each grade range (50 points per grade) is counted. The student flow path from junior high school to high school is analyzed, and the number of students from each junior high school who enter each high school is calculated, as well as the proportion of students from each junior high school in each high school's enrollment. The score rate for each subject is calculated, that is, the ratio of the average score of the subject to the total score of the subject. The number of admissions for each volunteer sequence is also counted, and the corresponding relationship between volunteer applications and admission results is analyzed.
[0067] S4: By building a model explanation view, we solve the "black box" problem of the random forest model, provide global model explanation and individual prediction attribution analysis, so that users can intuitively understand the decision logic of the model and provide a basis for personalized college entrance guidance.
[0068] See Figure 2 , Figure 2 This is an example of explaining the global model and individual student predictions in this invention. This view uses a matrix metaphor, with rows representing decision rules in the random forest, columns representing features, and cells encoding the range of features in the rules. Numerical features (such as subject score features) use the position and length of color blocks to represent intervals. Categorical features (such as volunteer features) assign independent regions to each category, and the category regions that meet the rules are filled with color.
[0069] In terms of global interpretation of the model, such as Figure 2 (a) Analyzing the total score column clearly shows that the predicted admission score ranges for major high schools are concentrated within a specific interval. The admission score ranges for each high school are clearly divided into different stages, which aligns with the high and low admission score levels of each high school over the years. In terms of feature importance, the total score has the highest importance value, at 0.48, which is consistent with the fact that the total score is the basis for admission to the high school entrance examination. Next in importance are the characteristics of choice 3 and choice 2, while choice 1 has the lowest importance.
[0070] In terms of students’ individual prediction explanations, e.g. Figure 2 (b) As can be seen, the student has the highest probability of being admitted to a high school in 1411. Regarding decision-making, the total score is the most influential factor in the model, followed by choice 3 and choice 4. The student is most likely to be admitted to the school in choice 4.
[0071] S5: Build a student prediction result view to present multi-dimensional data such as students' test scores, volunteer applications, and admission predictions in an intuitive tabular format, helping users quickly understand students' academic status, enrollment trends between schools, and abnormal situations, providing data support for personalized enrollment guidance and teaching strategy optimization.
[0072] See Figure 3 (a) The student prediction result view uses a composite table structure, with junior high schools as rows and high schools as columns, to build a basic data display framework. Each cell corresponds to a specific junior high school to high school combination and is used to display relevant student data. On the periphery of the table, a corresponding bar chart is added for each school to show the statistics of the number of students in each segment. Schools are separated by solid lines, and segments are distinguished by dotted lines. The table provides three types of information: "student", "score" and "admissionstatistics", which correspond to student information, test score statistics and volunteer application information respectively.
[0073] See Figure 3 (b) The table element design is divided into two display modes in the "student" module: "stu" and "group". When "group" is selected, each cell is represented by a rectangle. The larger the rectangle, the larger the number of students from the junior high school to the high school. When "stu" is selected, the rectangle in the cell becomes multiple small rectangles, each representing a student. The students are arranged in descending order of grades and the color transparency is set (the higher the grade, the higher the transparency). At the same time, abnormal students are marked with high-contrast colors (including prediction errors: bright red; high-scoring under-reporting (test scores 10% higher than the average score of the admitted school): brick red; high-scoring non-admission (the score is enough to enter high school, but was not admitted to any school): pink; low-scoring over-reporting (the score is low and does not meet the minimum score of the applied school): black). When "score" is selected, a pie chart is displayed in the cell, showing the proportion of each subject's score to the total score, and clearly presenting the relationship between each subject's score and the total score through angular proportion. After selecting "admissionstatistics," a simple line chart without axes appears in the cell, showing the number of students admitted to the nth choice, reflecting the admissions trend. Interactively, the student prediction results view supports merging rows or columns. When users select multiple schools for data comparison, clicking on a target school merges the corresponding rows or columns and brings them to the forefront. Specifically: when the "group" mode of "student" is selected to merge rows / columns, a bar chart is used for display. The position of the rectangle in the bar chart corresponds to the position of the school, and the length maps the number of students. When the "stu" mode is selected, the students of the selected school are merged and rearranged in descending order by score, which intuitively presents the comparison of student scores of each school. When "score" is selected to merge rows / columns, the pie chart is replaced by a donut chart - each arc represents a subject, and the size of the arc indicates the proportion of the subject in the total score. School arcs are drawn within the subject arc according to the school's score rate in the subject (the higher the score rate, the higher the school arc height, and the subject arc width is used as the scale), which facilitates the comparison of the subject strengths and weaknesses of each school. When "admission statistics" is selected to merge rows, line charts of multiple schools will be drawn on the same coordinate axis.
[0074] S6: Build a student list to support real-life information query, editing, and personalized guidance for individual students. By highlighting abnormal students, it accurately locates those who need focused guidance. It also supports real-time prediction and view linkage to provide students with personalized support for optimizing their enrollment strategies.
[0075] See Figure 4The student list displays the real information of individual students in detail, including student ID, junior high school, total score of the high school entrance examination, scores of each subject, volunteer application information, admission prediction results, etc. Abnormal students are highlighted to facilitate users to quickly locate them. The student list supports editing student grades and volunteer information. When the student data is modified, the system automatically triggers real-time prediction, reruns the model and updates the prediction results. At the same time, the model explanation view is triggered to dynamically display the newly triggered rules due to data adjustments and the admission probability of each school. After clicking on a student or modifying the student data, the system triggers Figure 2 (b), the model explanation view changes from global explanation to student individual prediction explanation.
[0076] See Figure 5 , Figure 5 The overall system constructed by the first embodiment of the system described in the present invention. A is the model explanation view, displaying the global explanation of the genetic algorithm-optimized random forest and the local explanation of the student instance. B is the student prediction result view, displaying the student's prediction results and statistics of exam and application data. C is the student list, displaying the student's actual information and real-time predictions of edited data.
[0077] See Figure 6 , Figure 6 The architecture diagram of an embodiment of the system of the present invention shows the core architecture and data processing flow of the system of the present invention, and embodies the complete process from data acquisition to visual analysis.
[0078] See Figure 7 , Figure 7 Schematic diagram of modules in an embodiment of the system of the present invention. A visualization analysis method and system for predicting high school entrance exam admission based on genetic algorithm optimized random forest:
[0079] The module 101 for obtaining the scores, schools, and volunteers of the high school entrance examination dataset is used to obtain the high school entrance examination dataset including student scores, graduated junior high schools, application volunteers, and admission results;
[0080] Model training prediction and rule extraction module 102, used to optimize the parameters of the random forest model through genetic algorithms, train the academic advancement prediction model, and extract interpretable logical rules from the decision tree path;
[0081] The prediction result, score and volunteer statistics module 103 is used to statistically analyze the predicted admission results, student score distribution, volunteer application popularity and abnormal admission situations;
[0082] Model visualization module 104, used to convert the decision logic of the random forest model into a matrix view, showing feature importance, rule coverage and individual prediction attribution analysis;
[0083] Student admission prediction, grades, and volunteer statistics visualization module 105 is used to visualize the junior high school-high school predicted enrollment flow, grade segmentation statistics, subject score rate, and volunteer admission ranking through a composite table view;
[0084] The student data display, editing, and real-time prediction module 106 is used to display student detailed data, support manual editing of grades or volunteer information, trigger real-time predictions and feedback new rule explanations, and assist in personalized admission guidance.
[0085] Different from the existing technology, the present invention provides a random forest model visualization and composite table visualization method and system with an improved matrix metaphor. This method addresses the problems of insufficient interpretability due to the "black box" nature of traditional random forest models and the lack of multidimensional correlation in educational data visualization analysis. Through innovative matrix metaphor design, complex decision rules are transformed into an interactive feature-rule matrix. Composite table visualization integrates prediction results, individual student data, and model interpretation information. A dynamic linkage mechanism between views is used to reveal the dynamic matching logic of "score-volunteer-admission" and differences in school teaching quality. This invention breaks through the functional limitations of a single view and constructs a multi-dimensional interactive analysis framework, providing a systematic visualization solution for personalized admission guidance, model decision transparency, and optimal allocation of educational resources.
Claims
1. A visual analysis method for predicting high school entrance examination admission based on genetic algorithm optimized random forest, characterized by: The specific steps are as follows: A. Obtain student scores, volunteer applications, junior high school enrollment, and high school admission data from the high school entrance exam dataset, as well as student junior high school enrollment, scores, and simulated volunteer application data from the high school entrance exam mock exam dataset; B. Use genetic algorithms to automatically adjust the parameters of random forests and extract decision rules; C. Use the trained model to predict student admissions, including statistics on the number of students in each junior and senior high school segment, student mobility between junior and senior high schools, score rates for each subject, and volunteer admissions. D. Address the "black box" problem of the random forest model through the Model Interpretation View, providing global model interpretation and individual prediction attribution analysis; E. By constructing a student prediction result view, a table is presented showing the multi-dimensional data of students' test scores, volunteer applications, and admission predictions; F. Support individual students’ real information query, editing and personalized guidance by building a student list.
2. The visual analysis method according to claim 1, characterized in that: When using the genetic algorithm to automatically tune the parameters of the random forest and extract decision rules as described in step B, first initialize the random forest; the random forest consists of multiple decision trees, and each tree outputs a classification result after inputting the samples; during the node splitting process of each decision tree, randomly select m try <M features as candidate splitting features to reduce the correlation between trees; use the Gini coefficient to evaluate the splitting quality, and the formula is: Among them, D is the node sample set, C is the number of categories, |D c | is the number of samples of category C; the Gini gain ΔGini after splitting is: Among them, D i For the child node sample set after splitting, splitting is performed by selecting the feature and threshold that maximizes ΔGini; during initialization, the key parameters need to be set: the number of trees n_estimators, the maximum depth max_depth, the maximum number of features max_features, the minimum number of samples per leaf node min_samples_leaf, and the maximum number of leaf nodes max_leaf_nodes; Then initialize the genetic algorithm population, where each individual represents a set of random forest parameters; evaluate the individual fitness through stratified K-fold cross validation, using the balanced accuracy as the indicator: Among them, n is the number of categories, TP i is the true number of cases in the i-th category, FN i is the number of false counterexamples of category i; Then, based on the individual fitness values, three individuals are randomly selected from the current population, and the individual with the highest fitness value is selected as the parent. The population is updated through two-point crossover and mutation operations until the termination condition is reached, the optimal parameters are obtained, and the final model is constructed. When the model is processed for classification features, the one-hot encoded features are restored to their original form. Finally, the decision rules are extracted and the decision path p (o,d) For numerical features, the lower limit of the regular vector The calculation is as follows: That is, if in p (o,d) There is feature f in m And its logic For ">", In these cases, θ i If this does not exist, is set as feature f in the dataset m The minimum value of the rule vector The calculation is as follows: That is, if in p (o,d) There is feature f in m And its logic For "≤", In these cases, θ i If it does not exist, then is set as feature f in the dataset m The maximum value of For categorical features, the discrete set F of the feature m ={a1,a2,…,a n }, when the symbol "==" is used for equality judgment, the rule value is a single-element set; when the symbol "!=" is used for non-equality judgment, the rule value is the set after removing the excluded value from the entire set.
3. The visual analysis method according to claim 1 or 2, characterized in that: The specific steps of Step C are as follows: Apply the random forest model optimized by the genetic algorithm to the high school entrance examination dataset to predict the admission destination of each student; at the same time, perform multi-dimensional statistical analysis on the data, including dividing the number of students in each segment of junior high and high school by score range, sorting out the flow path and scale of students from junior high school to high school, calculating the score rate of each subject to reflect the subject strengths and weaknesses of different schools and student groups, and compiling statistics on the correspondence between volunteer applications and admission results. This provides multi-dimensional data support for subsequent visual analysis and helps discover the key influencing factors and potential patterns in the "score-volunteer-admission" process.
4. The visual analysis method according to claim 1, wherein: In step D, a model explanation view is constructed. The specific steps are as follows: construct a basic matrix structure, where rows represent decision rules in random forests, columns represent features, cells encode the value range of features in the rules, numerical features use the position and length of color blocks to represent intervals, and categorical features assign independent areas to each category and fill them with corresponding colors; design interactive functions, and global explanation interactions support grouping by prediction category, sorting by rule coverage or prediction probability in descending order, setting coverage threshold filtering rules, and sorting columns by feature importance. Individual prediction attribution analysis supports instance trigger rule highlighting, feature contribution ranking, and real-time feedback, solving the "black box" problem of the model and providing global model explanation and individual prediction attribution analysis.
5. The visual analysis method according to claim 1, characterized in that: In step E, we construct the student prediction result view. The specific steps are as follows: Design the table structure layout, with junior high schools as rows and high schools as columns, and add a bar chart showing the student population statistics for each school segment. Set the calculation layout of the elements in the table, providing three information display modes: "student", "score", and "admissionstatistics". In the "student" mode, the "group" mode uses the rectangular area to reflect the scale of student mobility. The area calculation formula is: Among them, MaxNum is the maximum number of students in all cells, num is the number of students in a cell, Area base is the area of the base rectangle; the "stu" mode sorts the scores in descending order and distinguishes the scores by transparency. The transparency calculation formula is: Among them, Opacity is the transparency of the student rectangle, Score is the student's score, MinScore is the lowest score among all students, MaxScore is the highest score among all students, Opacity max is the maximum transparency value set; different colors are used to mark abnormal students; the "score" mode uses pie charts or donut charts to display subject scores, and uses the corresponding arc heights of different schools to compare subject score differences; the formula for calculating the arc height within the donut chart is: Among them, h represents the height of the school arc, S school is the school's score in the subject, S subject is the total score of the subject, and w is the width of the subject arc. The "admission statistics" mode uses a line chart to show the trend of the number of voluntary admissions. It implements dynamic interactive functions, supports row and column merging, and clicks on data points to link the model explanation view to display detailed student data. Hovering the mouse over the chart enlarges the display and displays detailed information, helping users quickly understand students' academic status, school admission trends, and abnormal situations.
6. The visual analysis method according to claim 1, characterized in that: The specific steps for building the student list described in step F are as follows: display the real information of individual students, including grades and preferences, highlight abnormal students, and facilitate accurate positioning of those who need key guidance; support editing student grades and preference information, trigger real-time prediction after data modification, the system automatically reruns the model and updates the prediction results, and at the same time triggers the model explanation view, dynamically displaying the newly triggered rules due to data adjustments and the admission probability of each school, providing students with personalized guidance and optimization support for enrollment strategies.