摘要
This paper focuses on the application of algorithms in data prediction scenarios, where prediction models are constructed and optimised through a variety of algorithms. In the data processing stage, pre-processing operations such as cleaning, removal of non-normal columns, mean interpolation, etc. are performed on the collected data, and unique thermal coding is also applied to transform specific data to build a solid foundation for subsequent analyses. In order to screen key features, the correlation between variables and target variables is measured by chi-square test, and strong correlated variables are screened out based on the chi-square value, which effectively reduces the complexity of the model. For model construction, XGBoost and LightGBM algorithms are used, both of which are based on Gradient Boosted Decision Tree (GBDT). Combining historical data for feature engineering, such as calculating the average and cumulative values of medals in the past Olympic Games, XGBoost uses gamma regression as the objective function, while LightGBM adopts the objective function of mean absolute error, and fuses the results of the two algorithms through the weights of 0.6 and 0.4, and then evaluates the performance of the model with the mean squared error. In addition, a BP neural network is constructed for a specific scenario, a hidden layer containing 30 neurons is set up, 80% of the training set and 20% of the validation set are divided, and the model performance is evaluated by accuracy, precision, recall, and F1 score after training, prediction, and result processing. These algorithms are applied to real data prediction and show good results, providing examples of effective algorithms for similar prediction tasks.