Method for fish species distribution and abundance prediction based on enhanced ensemble machine learning
Patent Information
- Application Number
- CN202610785962.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-09-01
AI Technical Summary
[0003]本发明提供一种基于增强集成机器学习的鱼类物种分布和丰度预测方法,旨在将多输出集成树模型产生的非线性固定效应预测值,作为分层多物种群落模型的输入协变量,并在统一贝叶斯框架内联合估计空间随机效应和物种互作随机效应,以此解决现有单一方法在复杂环境响应刻画、空间依赖描述和物种互作解析方面难以兼顾的问题
Smart Images

Figure CN122674902A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fish ecological prediction technology, specifically to a method for predicting fish species distribution and abundance based on augmented ensemble machine learning. Background Technology
[0002] Predicting the distribution probability and abundance of fish species is a fundamental issue in fisheries resource assessment, protected area planning, and ecological response research. Existing methods typically employ either statistical joint species distribution models or single machine learning models. Statistical joint species distribution models can incorporate environmental fixed effects, spatial random effects, and inter-species interaction effects into a unified hierarchical Bayesian framework; however, the fixed effects component is often based on linear or generalized linear forms, making it difficult to fully capture the complex nonlinear mapping of environmental variables to the abundance or probability of occurrence of multiple fish species. Single machine learning models, such as gradient boosting trees, while possessing strong nonlinear fitting capabilities, cannot explicitly model spatial autocorrelation structures and synergistic or antagonistic relationships between species when handling multi-species joint predictions. This can easily lead to neglect of internal community ecological processes and biases in prediction results across spatial and species dimensions. Directly using predictions obtained from multi-output machine learning models still treats each site and species as independent samples, failing to decompose residual correlations caused by spatial heterogeneity and conditional dependencies arising from inter-species interactions, thus limiting the model's generalization performance in extrapolation and sparse data regions. Therefore, it is necessary to solve how to effectively integrate spatial random variation and interactions among multiple species while preserving the flexibility of machine learning models in describing responses to complex environments, so as to obtain a method that is more consistent with community organization patterns and has higher prediction accuracy. Summary of the Invention
[0003] This invention provides a method for predicting fish species distribution and abundance based on enhanced ensemble machine learning. It aims to use the nonlinear fixed effects predictions generated by the multi-output ensemble tree model as input covariates of the hierarchical multi-species community model, and jointly estimate spatial random effects and species interaction random effects within a unified Bayesian framework. This solves the problem that existing single methods are difficult to simultaneously address in terms of complex environmental response characterization, spatial dependence description, and species interaction analysis.
[0004] The objective of this invention can be achieved through the following technical solutions: This invention provides a method for predicting fish species distribution and abundance based on augmented ensemble machine learning, comprising the following steps: Acquire environmental variable data and fish species abundance data from multiple sites; Using the multi-output XGBoost model as a fixed effects extractor, a multi-species fixed effects prediction matrix is calculated based on the environmental variable data. The XGBoost ensemble learning mechanism is used to effectively capture the nonlinear fixed effects relationship between environmental variables and multiple species, and to automatically learn the differentiated response patterns of different species to environmental gradients. Using the multi-species fixed effect prediction matrix as covariates, a hierarchical Bayesian species community model (HMSC) framework containing spatial random effects and species interaction random effects is constructed to explicitly model ecological processes such as spatial autocorrelation and inter-species interactions. Within the HMSC model framework, the fixed effects and random effects are jointly estimated based on Bayesian methods to complete the training of the coupled model and output the distribution probability or abundance prediction of fish species. This achieves synergistic inference of environmental fixed effects and ecological random effects, improving prediction accuracy and ecological interpretability.
[0005] As a preferred embodiment of the present invention, the use of a multi-output XGBoost model as a fixed effects extractor further includes: constructing a multi-output XGBoost model containing multiple decision trees; for each observation site, calculating the output contribution of each multi-output decision tree to each species, summing the output values of all decision trees, and then transforming the sum using a sigmoid function to obtain the fixed effects prediction values for each species at that site. This processing method can quantify the combined effects of environmental factors, providing input for subsequent random effects modeling that removes deterministic environmental trends.
[0006] As a preferred embodiment of the present invention, the constructed complete coupled model expresses the actual distribution value of the s-th species at the i-th site as the sum of the fixed effects prediction, the spatial random effects of the s-th species at that site, the random effects of species interactions, and the model random error. Through this structure, the model can separate the contributions of environmental filtering and ecological stochastic processes to species distribution patterns, enhancing the understanding of community building mechanisms.
[0007] Within the HMSC model framework, a logit link function is used to model the species occurrence probability for binary distribution data, while a logarithmic link function is used for abundance data. This allows the method to flexibly adapt to different types of response variables, expanding its application scenarios.
[0008] For the aforementioned spatial random effects, possible construction methods include: using a Gaussian process to construct the model, characterizing spatial autocorrelation through the inter-species spatial effect covariance matrix and a spatial covariance function based on the Euclidean distance between stations, where the spatial covariance function introduces spatial variance and length scale parameters to express spatial dependence that decays with distance; or using an adjacency matrix, classifying monitoring points into discrete spatial blocks, introducing normally distributed random effects at the block level, and defining spatial associations between blocks through an adjacency matrix. Both methods can effectively capture the smoothing effects of unobserved spatial variables on the distribution of multiple species, improving the stability and extrapolation ability of predictions.
[0009] For the aforementioned random effects of species interactions, the preferred construction scheme is as follows: a standardized random vector is extracted from a multivariate normal distribution, and the correlation between species is introduced through a species interaction covariance matrix; the species interaction effect vector of each site is obtained by multiplying the square root of the covariance matrix with the random vector, thereby allowing the model to infer species coexistence patterns and potential biological interaction signals from multi-species data.
[0010] During the model training phase, while using Bayesian joint estimation, the WAIC criterion is employed for environmental factor screening and optimal model selection. The WAIC criterion integrates Bayesian training loss and structural variation, automatically balancing model fit and complexity to avoid overfitting and ensure that the selected model possesses both excellent predictive performance and simplicity. After the coupled model training is complete, the root mean square error (RMSE) is used to evaluate the model's predictive ability, and the coefficient of determination (R-squared) is used to evaluate the model's fit, validating predictive accuracy from multiple dimensions.
[0011] This invention effectively couples multi-output XGBoost with a hierarchical Bayesian species community model. The former extracts the nonlinear fixed effects of high-dimensional environmental variables, while the latter incorporates spatial random effects and species interaction random effects. This significantly enhances the explanatory power of community ecological mechanisms while maintaining high predictive efficiency. The method can simultaneously output the distribution probability or abundance predictions of multiple species, with better prediction accuracy than a single model. It can also provide species association information at the community level, providing a reliable scientific basis for fishery resource assessment and biodiversity conservation.
[0012] The beneficial effects of this invention are: A multi-output XGBoost model is used as the fixed effects extractor. Environmental variable data are summed from the outputs of multiple decision trees and subjected to probability scaling to obtain a multi-species fixed effects prediction matrix. This matrix serves as the input covariate for the hierarchical model, preserving the nonlinearity, interactions, and threshold response structures autonomously learned by the tree ensemble model from a large number of environmental predictors. Compared to linear fixed effects community models, this approach can transmit complex environmental drivers to subsequent levels without explicitly setting nonlinear basis functions, reducing underfitting caused by fixed effects specification bias.
[0013] Within the HMSC model framework, spatial random effects expressed using Gaussian processes or adjacency matrices and species interaction random effects based on species covariance matrix decomposition are introduced simultaneously. Spatial random effects, through spatial variance parameters and length scale parameters or adjacency relationships, capture spatial autocorrelation caused by unmeasured environmental gradients or diffusion constraints, separating spatial structural remnants unexplained by environmental fixed effects from the error term. Species interaction random effects, using the species interaction covariance matrix, reflect co-occurrence patterns among species within the community that exceed environmental selection, including processes such as competition, promotion, or trophic cascades. Both types of random effects, along with the fixed effect prediction covariates, are inferred within a Bayesian joint estimation framework. Markov chain sampling simultaneously updates the covariance parameters of random effects and the posterior distribution of fixed effect coefficients, achieving a fusion and quantification of fixed effect uncertainty, spatial dependence strength, and species association networks. This joint estimation method enables the prediction model to output the expected species occurrence probability or abundance for each site, the complete posterior interval around the prediction, and the inter-species residual correlation matrix in multi-species synchronous prediction tasks, improving the robustness of the prediction and the explanatory power of ecological mechanisms. Attached Figure Description
[0014] The invention will now be further described with reference to the accompanying drawings.
[0015] Figure 1 This is a flowchart of a method for predicting fish species distribution and abundance based on augmented ensemble machine learning; Figure 2 This is a flowchart of the link function selection process based on data type judgment in the HMSC model framework; Figure 3 This is a schematic diagram illustrating two ways of constructing spatial random effects; Figure 4 This is a flowchart of environmental factor screening and optimal model selection based on the WAIC criteria. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] See Figure 1 This invention provides a method for predicting fish species distribution and abundance based on augmented ensemble machine learning, comprising the following steps: Environmental variable data and fish species abundance data from multiple sites are acquired; a multi-output XGBoost model is used as a fixed effects extractor to calculate a multi-species fixed effects prediction matrix based on the environmental variable data; the multi-species fixed effects prediction matrix is used as a covariate to construct an HMSC model framework that includes spatial random effects and species interaction random effects; within the HMSC model framework, the fixed effects and random effects are jointly estimated using Bayesian methods to complete the training of the coupled model, so as to output the distribution probability or abundance prediction value of fish species.
[0018] In practical implementation, the method for predicting fish species distribution and abundance based on augmented ensemble machine learning is implemented as follows: Environmental variable data and fish species abundance data were acquired from multiple sites. Environmental variable data included marine environmental factors such as water temperature, salinity, depth, dissolved oxygen concentration, and distance from shore. M environmental variables were collected from each site, forming an environmental variable matrix. Fish species abundance data consisted of the presence or count data of S fish species obtained from the survey at different sites.
[0019] A multi-output XGBoost model was used as the fixed effects extractor to calculate a multi-species fixed effects prediction matrix based on environmental variable data. The multi-output XGBoost model contains K multi-output decision trees, each of which simultaneously outputs a prediction vector of length S for S species. The number of decision trees K was determined by performing 5-fold cross-validation on the candidate set {100, 200, 500, 1000}, selecting the K value that minimizes the log loss on the validation set. For the environmental variable value vector of the i-th site... ,in This represents the value of the m-th environmental variable at the i-th site, where M is the total number of environmental variables. The k-th multi-output decision tree calculates an S-dimensional vector, and the s-th element in the vector is denoted as... This element represents the original output value of the k-th decision tree for the s-th species. The outputs of the k decision trees are summed by species, and then processed using the sigmoid function. By performing probability mapping, we obtain the fixed effects prediction value for the s-th species at the i-th site. Perform the above calculations on all sites and all species to obtain a multi-species fixed effects prediction matrix with the dimension being the number of sites multiplied by the number of species.
[0020] Using the multi-species fixed effects prediction matrix as covariates, a HMSC model framework incorporating spatial random effects and species interaction random effects is constructed, forming a complete coupled model, expressed as:
[0021] in, This represents the actual distribution value of the s-th fish species at the i-th site. When the response is binary occurrence data, it takes the value 0 or 1, and when the response is abundance data, it takes a non-negative integer. The fixed effects predictions calculated for the multi-output XGBoost model are used as known offsets and fed into the model. The spatial random effect of the s-th species at the i-th site is used to capture the spatial structure of species distribution that is not explained by environmental variables. The random effect of species interaction of the s-th species at the i-th site is used to capture co-occurrence patterns among species. The model's random error follows a pattern with a mean of 0 and a variance of . The normal distribution, Let be the residual variance parameter to be estimated.
[0022] When constructing the HMSC model framework, for binary distribution data (fish presence or absence records), the linear predictor uses a logit link function; for abundance data, the linear predictor uses a logarithmic link function. Spatial random effects. The construction is achieved through spatial latent variables, and its prior structure can be a Gaussian process based on site coordinates or an adjacency matrix based on discrete spatial blocks; random effects of species interactions This is achieved by decomposing the species interaction covariance matrix, with the prior set as the product of the decomposition factor and the standard normal latent vector. All random effect parameters use weak-information priors to ensure that the inference is primarily data-driven.
[0023] Within the HMSC model framework, the coefficients of the fixed-effects covariates (the fixed-effects part only includes...) are calculated using Bayesian methods. As an offset (with a fixed coefficient of 1), it is jointly estimated with all random effect parameters. Specifically, the Hamiltonian Monte Carlo algorithm is used for posterior sampling, with four independent Markov chains, each iterating 6000 times. The first 3000 iterations are discarded as a refinement period, and the last 3000 iterations are used for posterior inference. The final outputs are the posteriormean and 95% credible interval for each parameter. After model training, the posterior samples are used to predict new sites, generating the posterior predicted distribution of the probability or abundance of fish species.
[0024] In specific implementation, please refer to Figure 2 When fish species data exhibits a binary distribution, meaning each station's record for each species is simply a binary classification of presence or absence, the linear predictor in the HMSC model framework is constructed using the logit link function. The expression for the linear predictor is:
[0025]
[0026] in: This represents the probability of the s-th species appearing at the i-th site, ranging from 0 to 1. This is calculated by substituting the linear prediction part into the inverse logit function. get; This is the fixed effect prediction value of the s-th species at the i-th site, calculated by the multi-output XGBoost model. When the multi-species fixed effect prediction value matrix is incorporated into the HMSC model, this value is treated as an offset. This represents the spatial random effect of the s-th species at the i-th site; Let represent the random effect of species interaction of the s-th species at the i-th site.
[0027] In practical implementation, when fish species data is presented as abundance data—that is, recording the individual count of each species at each site—the linear predictor of the HMSC model framework is constructed using a logarithmic link function. In this case, the linear predictor expression is:
[0028]
[0029] in, It is the expected abundance of the s-th species at the i-th site, and its value is greater than 0; The fixed effect prediction value of the s-th species at the i-th site, calculated by the multi-output XGBoost model, is used as the offset and fed into the linear predictor. and The meaning is the same as before.
[0030] In the actual execution of the HMSC model framework, the data type is determined by examining the numerical characteristics of the input data matrix. If all elements in the fish species data matrix consist of 0s and 1s, the data type is determined to be binary distributed data, and the linear predictor automatically selects the logit link function. If the data matrix contains integer values greater than 1, the data type is determined to be abundance data, and the linear predictor automatically selects the logarithmic link function. After selecting the link function, the posterior sampling module of the HMSC model framework constructs a likelihood function based on the corresponding observation model. Binary distributed data corresponds to the Bernoulli distribution likelihood, and abundance data corresponds to the Poisson distribution or negative binomial distribution likelihood. This allows for the joint posterior inference of the fixed-effects offset coefficients, spatial random-effects parameters, and species interaction random-effects parameters during the Bayesian estimation process.
[0031] In specific implementation, please refer to Figure 3 Spatial random effects The construction offers two optional methods: a Gaussian process method based on the latitude and longitude coordinates of the monitoring points, and an adjacency matrix method based on discrete spatial blocks.
[0032] When constructing spatial random effects using Gaussian processes, for the i-th and j-th monitoring points, the spatial covariance matrix is... The elements in are calculated using the following formula:
[0033] in: Represents the latitude and longitude coordinate vector of the i-th monitoring point, a two-dimensional vector composed of the longitude and latitude coordinate values of the monitoring point; This represents the latitude and longitude coordinate vector of the j-th monitoring point; This represents the Euclidean distance between the coordinate vectors of the i-th monitoring point and the j-th monitoring point. This represents the spatial variance parameter, used to control the overall variability of spatial random effects. The value of is obtained by sampling from the posterior distribution through Bayesian estimation. Its prior distribution is set as an inverse Gamma distribution, with the shape parameter set to 2 and the scale parameter set to 1, in order to provide weak prior information. This represents a length scale parameter used to control the decay rate of spatial correlation. The value of is obtained by sampling from the posterior distribution through Bayesian estimation. Its prior distribution is set as a semi-Cauchy distribution, and the scale parameter is set to 2.5 to allow for flexibility in different spatial dependencies. This refers to the set of parameters involved in the spatial covariance matrix. The spatial covariance elements between each pair of monitoring points are calculated using the formula described above, thus forming the complete spatial covariance matrix. Standardized spatial random effects vector. It follows a Gaussian process with a mean of zero and a covariance matrix equal to the spatial covariance matrix described above. The spatial random effects of the s-th species at the i-th site. Through the covariance matrix of spatial effects among species With the standardized spatial random effects vector The product of the product is used to obtain the spatial effect covariance matrix between species. Let be the square root of the spatial effect covariance matrix among species. The prior distribution of this matrix is set to an inverse Wishart distribution. The degrees of freedom are set to the total number of species, S plus 2. The scale matrix is set to an S-order identity matrix. During Bayesian model training, the spatial variance parameter... Length scale parameters The components of the inter-species spatial effects covariance matrix and the standardized spatial random effects vector were all estimated by joint sampling with the fixed effects offset and other random effects parameters using the Hamiltonian Monte Carlo algorithm.
[0034] Optional, spatial random effects An adjacency matrix is used for construction. In this approach, the study area needs to be pre-divided into several discrete spatial blocks, and each monitoring point is assigned to a discrete spatial block based on its latitude and longitude coordinates. This represents the discrete spatial block number to which the i-th monitoring point belongs. Discrete spatial blocks can be divided according to latitude and longitude grids, or according to natural geographical boundaries or administrative jurisdictions. After division, each discrete spatial block contains one or more monitoring points. A standardized spatial random effects vector is defined at the discrete spatial block level. This standardized spatial random effects vector follows a multivariate normal distribution with a mean of zero and a covariance matrix equal to the spatial adjacency matrix. The spatial adjacency matrix is a symmetric matrix, and the elements corresponding to any two discrete spatial block numbers are defined as follows: if the two discrete spatial blocks are geographically adjacent, the element has a value of 1; otherwise, the element has a value of 0. The square root of the inter-species spatial effects covariance matrix is multiplied by the standardized spatial random effects vector at the discrete spatial block level to obtain the spatial random effects vector at the discrete spatial block level. The spatial random effects of the s-th species at the i-th station are represented by this vector. The s-th element is taken as the vector obtained by multiplying the square root of the inter-species spatial effect covariance matrix by the standardized spatial random effect vector at the discrete spatial block level. The prior distribution of the inter-species spatial effect covariance matrix is consistent with the Gaussian process approach, set as an inverse Wishart distribution, with the degrees of freedom parameter being the total number of species S plus 2, and the scale matrix being an S-order identity matrix. The total number of discrete spatial blocks and the specific partitioning scheme are pre-specified by the user based on the spatial scale of the study area and the distribution density of monitoring points, and remain fixed during the Bayesian estimation process.
[0035] In practice, the random effects of species interactions The construction is achieved through the decomposition of the species interaction covariance matrix and the linear transformation of the standardized random vectors. For all S species, an S-dimensional species interaction covariance matrix is constructed. Species interaction covariance matrix This is a symmetric positive definite matrix used to describe the correlation and variability of random effects of interactions between different species. Species interaction covariance matrix. The prior distribution is set as an inverse Wishart distribution, with the degrees of freedom parameter set to the total number of species S plus 2. The scale matrix of the inverse Wishart distribution is set to an S-order identity matrix. This prior setting ensures that the posterior estimation of the species interaction covariance matrix is primarily driven by observational data. (The sentence about the species interaction covariance matrix is incomplete and lacks context.) Perform Cholesky decomposition or matrix square root decomposition to obtain the square root of the species interaction covariance matrix. The square root of the species interaction covariance matrix satisfy .
[0036] For the i-th monitoring point, generate an S-dimensional normalized random vector. Standardized random vectors The components of the vector are independent of each other, and each component follows a standard normal distribution with a mean of 0 and a variance of 1, i.e., a standardized random vector. The probability distribution is a multivariate standard normal distribution:
[0037] in: Let S represent the standardized random vector of the i-th monitoring point. The dimension of this standardized random vector is the same as the total number of species S. This represents a zero vector with mean of S dimensions and a covariance matrix of S dimensions, representing the identity matrix. The multivariate normal distribution; Let S represent the identity matrix of order S, where S represents the total number of fish species. The value of S depends on the number of species actually recorded in the survey. The square root of the species interaction covariance matrix is then calculated. With standardized random vectors Multiplying these results in the species interaction effect vector for the i-th monitoring point. ,Right now The random effects of species interactions of the s-th species at the i-th site. That is, the vector of species interaction effects. The s-th element in.
[0038] In the Bayesian estimation process within the HMSC model framework, the species interaction covariance matrix... With standardized random vectors All variables were considered as latent variables to be estimated and were jointly sampled posteriorly using the Hamiltonian Monte Carlo algorithm along with fixed-effects offsets, spatial random-effects parameters, and model residual variance parameters. In each iteration, the species interaction covariance matrix of the currently sampled variables was used as the basis for estimation. Calculate the square root of the corresponding matrix Then, it is combined with the currently sampled standardized random vector. Multiply the vectors to update the species interaction effect vectors at each monitoring point, and then obtain the random effect of species interactions for each species at each site. The posterior samples.
[0039] In specific implementation, please refer to Figure 4 In the process of jointly estimating fixed and random effects using the Bayesian method, the WAIC criterion is employed for environmental factor screening and optimal model selection. The formula for calculating the WAIC criterion is as follows:
[0040]
[0041] in: This represents the total number of data points used for model training, with each data point corresponding to an observation record of a species from a single site. Let represent the Bayesian training loss function. The formula for calculating the Bayesian training loss function is: , This represents the observation data of the i-th data point. This represents the observed data under the posterior predicted distribution of a given model. The Bayesian prediction density is obtained by averaging the posterior samples; This represents structural variation, and the formula for calculating structural variation is: ,in This represents the observation data of the i-th data point. This represents the model parameter vector, which includes spatial random effects parameters, species interaction random effects parameters, and residual variance parameters. These represent community-level parameters, specifically hyperparameters in the inter-species spatial effects covariance matrix and the inter-species interaction covariance matrix. Indicates the level parameter of a given community Under the condition of model parameters The expected value, i.e. the posterior mean, of the posterior distribution is calculated. Indicates that given model parameters Observational data under the conditions The log-likelihood function value.
[0042] When screening environmental factors, multiple candidate models containing different subsets of environmental variables were constructed. The fixed effects component of each candidate model consisted of a multi-species fixed effects prediction matrix calculated by a multi-output XGBoost model based on the corresponding subset of environmental variables. For each candidate model, after performing Bayesian joint estimation, the WAIC criterion value was calculated using posterior samples. The smaller the WAIC value, the better the balance between goodness of fit and complexity. The WAIC values of all candidate models were compared, and the subset of environmental variables corresponding to the model with the smallest WAIC value was selected as the final selected combination of environmental factors, and this model was determined as the optimal model.
[0043] After the coupled model is trained, the root mean square error (RMSE) is used to evaluate its predictive ability. Real-world data from the sites in the validation dataset will then be used. Compared with model predictions Substituting into the RMSE calculation formula, where the model prediction value Take the expected value of the posterior predicted distribution. The smaller the root mean square error, the smaller the prediction error of the model. Simultaneously, the coefficient of determination is used. Evaluate the model's fit. Substitute the sum of squared errors (SSE) and the total sum of squared deviations (SST) into the formula for calculating the coefficient of determination. Here, SSE is the sum of squared differences between observed and predicted values for all species at all sites in the validation dataset, and SST is the sum of squared differences between observed and mean values for all species at all sites. Coefficient of Determination The value ranges from 0 to 1, and the closer the value is to 1, the better the model fits the data.
[0044] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for predicting fish species distribution and abundance based on augmented ensemble machine learning, characterized in that, Includes the following steps: Acquire environmental variable data and fish species abundance data from multiple sites; The multi-output XGBoost model was used as a fixed effects extractor to calculate a multi-species fixed effects prediction matrix based on the environmental variable data. Using the multi-species fixed effects prediction matrix as covariates, an HMSC model framework incorporating spatial random effects and species interaction random effects is constructed. Within the HMSC model framework, the fixed effects and the random effects are jointly estimated based on the Bayesian method to complete the training of the coupled model, so as to output the distribution probability or abundance prediction value of fish species.
2. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 1, characterized in that: The step of using the multi-output XGBoost model as a fixed effects extractor to calculate the multi-species fixed effects prediction matrix based on the environmental variable data specifically includes: Construct a multi-output XGBoost model containing K decision trees; For the m-th environmental variable value of the i-th site The output value for the s-th species is calculated using the k-th multi-output decision tree. ; The output values of the K decision trees are summed and then passed through the sigmoid function. The transformation yields the fixed-effects prediction for the s-th species at the i-th site. The calculation formula is as follows: ; in, Let m be the value of the m-th environmental variable for the i-th sample, and M be the total number of environmental variables. , where s is the fixed effect value, i is the species number, and i is the observation station number.
3. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 2, characterized in that: In the step of constructing an HMSC model framework that includes spatial random effects and species interaction random effects, the expression of the complete coupled model is as follows: ; in, This represents the actual distribution value of the s-th fish species at the i-th site. The fixed effects prediction values are calculated by the multi-output XGBoost model. For the spatial random effect of the s-th species at the i-th site, Let be the random effect of species interaction of the s-th species at the i-th site. This represents the random error of the model.
4. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 3, characterized in that: In the step of constructing an HMSC model framework that includes spatial random effects and species interaction random effects by using the multi-species fixed effects prediction matrix as covariates, for binary distributed data, the linear predictor of the HMSC model framework uses the logit link function, the expression of which is: ; in, Let be the probability of the occurrence of the s-th species at the i-th site; for abundance data, the linear predictor of the HMSC model framework uses a logarithmic link function, the expression of which is: 。 5. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 3, characterized in that: The spatial random effect Constructed using a Gaussian process, its expression is: ; ; ; in, The spatial effect covariance matrix among species. For the standardized spatial random effects vector, For Gaussian processes, Let be the spatial covariance matrix. Let be the latitude and longitude coordinates of the i-th monitoring point. Let J be the latitude and longitude coordinates of the j-th monitoring point. Let i be the Euclidean distance between monitoring points i and j. For spatial variance parameters, This is the length scale parameter.
6. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 3, characterized in that: The spatial random effect It is constructed in the form of an adjacency matrix, and its expression is: ; ; ; in, The spatial effect covariance matrix among species. For the discrete spatial block to which the i-th monitoring point belongs, This represents the standardized spatial random effects vector at the block level. It follows a normal distribution. It is a spatial adjacency matrix. and Number the two distinct discrete spatial blocks.
7. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 3, characterized in that: The random effects of species interactions The construction process is as follows: ; ; in, Let be the vector of all species interaction effects at the i-th monitoring point. This is the species interaction covariance matrix. For standardized random vectors, Let S be an identity matrix of order S, where S is the total number of species; The random effect of species interaction of the s-th species at the i-th site The value is the vector. The s-th element in.
8. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 1, characterized in that: In the step of jointly estimating the fixed effects and the random effects based on the Bayesian method, the WAIC criterion is used for environmental factor screening and optimal model selection. The calculation formula for the WAIC criterion is as follows: ; Where n is the number of data points. The expression for the loss function used in Bayesian training is as follows: ; For structural variations, the expression is: ; in, For the observation data of the i-th station, For model parameters, For community-level parameters, Represents the posterior mean. This represents the Bayesian prediction distribution.
9. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 1, characterized in that: After the coupled model is trained, the root mean square error (RMSE) is used to evaluate the model's predictive ability. The formula for calculating RMSE is as follows: ; in, For the actual survey data of the i-th site, Let be the model prediction value for the i-th site, and n be the total number of data points used for validation.
10. The method for predicting fish species distribution and abundance based on augmented ensemble machine learning according to claim 1, characterized in that: After the coupled model is trained, the coefficient of determination is used. To evaluate the model's fit, the aforementioned The calculation formula is: ; Where SSE is the sum of squared errors and SST is the sum of squared total deviations.