The application discloses a two-dimensional
layout algorithm selection method and
system based on
machine learning, and the method comprises the following steps: constructing and training XGBoost model and full connection neural
network model, and establishing a two-dimensional
layout algorithm library; acquiring real-time
layout data, extracting features and calculating characteristic values, inputting the XGBoost model to obtain the selection probability of each
algorithm, and screening out the candidate algorithm sequence exceeding the preset probability threshold; sorting the candidate algorithm according to whether the
time factor needs to be considered, calling the solution in sequence, determining the final algorithm if successful, and trying the subsequent algorithm in sequence if failed; if all the algorithms fail, inputting the characteristic values into the full connection neural network to generate the first n optimal algorithms, and constituting a new sequence to solve again. The application solves the problems that in the two-dimensional
layout algorithm selection method depending on artificial experience or trial-and-error method, the artificial experience may lead to subjective bias, thereby affecting the accuracy and optimality of
algorithm selection; and the trial-and-error method is easy to introduce a large amount of invalid calculation, thereby leading to the problem of low
algorithm selection efficiency.