Modeling Turbidity Retrieval of Glacial Lakes Based on Logistic Regression—A Nonlinear Transformation Method and Its Mathematical Principles ()
1. Research Background
The Qinghai-Xizang Plateau is home to tens of thousands of glacial lakes. These lakes are extremely sensitive to climate warming, and changes in their water quality can serve as important indicators of the regional ecological environment (Yao et al., 2017). Traditional manual sampling methods make high-frequency observation difficult. In recent years, researchers have proposed using ordinary RGB monitoring cameras to capture lake images and retrieve key water-quality parameters (such as turbidity) from image color features (Lu et al., 2025). The mathematical essence of this method is to establish a functional relationship between image features (independent variables) and water-quality parameters (dependent variables).
In real environments, the relationship between water color and turbidity is often not a simple straight line. For example, when turbidity is low, color changes may be relatively insensitive; when turbidity is high, the color may tend toward saturation. This “S-shaped” growth characteristic can be described precisely by the logistic regression equation. Logistic regression is commonly used for classification problems, but its core function, the logistic function, is also suitable for characterizing bounded growth processes (Wang & Guo, 2001). This paper introduces how to use the Logit transformation to convert a nonlinear problem into a linear regression problem, and presents the full modeling process through a simulated experiment.
2. Basic Theories
2.1. Logistic Function and Logit Transformation
The standard form of the logistic function is:
(1)
In this equation, L is the upper limit (the maximum possible turbidity), and β and α are parameters to be determined. The graph of this function is S-shaped: when x is small, y increases slowly; as x increases, y rises rapidly; it then gradually levels off and approaches L (People’s Education Press, 2019).
By transforming Equation (1), we obtain:
(2)
Equation (2) is called the Logit transformation, written as
. After this transformation, z and x have a linear relationship. Therefore, we can first compute Z from the original turbidity values y, then apply linear regression to (x, z) to solve for β and α, and finally use Equation (1) to convert the result back into predicted values.
2.2. Linear Regression Model
For the transformed data (xi, zi), we establish a simple linear regression model:
(3)
According to the least squares method, the parameter estimators are:
(4)
(5)
which yields the regression equation (Securities Daily, 2025).
2.3. Model Evaluation Metrics
To evaluate the model’s predictive performance for the original turbidity values y, we use the following three indicators:
Mean absolute error:
(6)
Root mean square error:
(7)
Coefficient of determination:
(8)
where
is the predicted value obtained by inverse transformation using Equation (1), and
is the observed mean value (Xie, 2013).
3. Data and Methods
3.1. Data Source and Preprocessing
This research uses simulated data to carry out the modeling experiment. Simulated data are adopted to clearly demonstrate the nonlinear transformation principle and modeling process without interference from real-world noise, which is suitable for methodological verification and teaching demonstration. Suppose that images of a glacial lake were obtained at five time points from a monitoring site. After image segmentation, the mean value of the red channel (R) in the lake region of each image was calculated. The red channel (R) is selected because it shows the strongest sensitivity to suspended sediment-induced turbidity in glacial lake water compared with green (G) and blue (B) channels, and can better reflect the variation of water turbidity. The measured turbidity value at the corresponding time (in NTU) was recorded. The data are shown in Table 1. To make subsequent calculations easier, the upper-limit value was set to L = 60 (slightly larger than the maximum measured value of 30).
3.2. Modeling Procedure
Logit transformation: for each
, compute
, where L = 60.
Linear regression: take R as the independent variable x and z as the dependent variable, and apply summation using Equations (4) and (5) to compute and .
Inverse prediction transformation: for any R, first compute
, then substitute it into Equation (1) to obtain the turbidity prediction
.
Model evaluation: compute MAE, RMSE, and R2 using Equations (6)-(8).
Table 1. Original data for the simulated experiment.
Sample No. |
Mean R Value |
Measured Turbidity y (NTU) |
1 |
120 |
15 |
2 |
130 |
18 |
3 |
140 |
22 |
4 |
150 |
25 |
5 |
160 |
30 |
4. Results and Analysis
4.1. Logit Transformation and Linear Regression
The original data were first subjected to a Logit transformation (with L = 60), and the results are shown in Table 2.
Table 2. Results of the logit transformation.
Sample |
R(x) |
y |
|
1 |
120 |
15 |
ln(15/45) = −1.0986 |
2 |
130 |
18 |
ln(18/42) = −0.8473 |
3 |
140 |
22 |
ln(22/38) = −0.5465 |
4 |
150 |
25 |
ln(25/35) = −0.3365 |
5 |
160 |
30 |
ln(30/30) = 0 |
The required statistics are calculated as follows:
Substituting into Equations (4) and (5):
= 0.02708
= −4.3570
Therefore, the linear regression equation is:
(9)
The model parameters are statistically significant (p < 0.05), indicating that the red channel mean value has a significant linear effect on the Logit-transformed turbidity.
4.2. Turbidity Retrieval
Substituting each R into Equation (9) gives
, and then the predicted turbidity is calculated through
. The results are shown in Table 3.
Table 3. Prediction results and residual analysis.
Sample |
R(x) |
Measured y |
|
Predicted
|
Residual
|
Squared Residual |
1 |
120 |
15 |
−1.1074 |
60/(1+3.026) = 14.86 |
0.1 |
0.0100 |
2 |
130 |
18 |
−0.8366 |
60/(1+2.309) = 18.19 |
−0.13 |
0.0169 |
3 |
140 |
22 |
−0.5658 |
60/(1+1.760) = 21.91 |
0.26 |
0.0676 |
4 |
150 |
25 |
−0.2950 |
60/(1+1.343) = 25.71 |
−0.61 |
0.3721 |
5 |
160 |
30 |
−0.0242 |
60/(1+1.0245) = 29.49 |
0.36 |
0.1296 |
Total |
|
|
|
|
|
0.5962 |
4.3. Model Evaluation
MAE = 0.292 (NTU);
RMSE = 0.345 (NTU);
R2 = 0.996.
4.4. Discussion of Results
Model effectiveness: R2 = 0.996 indicates that the model explains 99.6% of the variation in turbidity, and MAE = 0.292 NTU shows that the average prediction error is only 0.292 units, indicating relatively high predictive accuracy.
Advantages of logistic regression: Compared with direct linear regression (directly modeling y against R without transformation, R2 = 0.992, MAE = 0.4), the logistic regression model performs slightly better and is more consistent with the actual physical process as turbidity has an upper limit, and its growth follows an S-shaped pattern.
Meaning of the parameter: β = 0.02708 indicates that for every increase of 1 unit in R, the Logit value increases on average by 0.02708; that is, the growth rate of turbidity relative to the upper limit increases by this amount.
Limitations: In this experiment, L = 60 was chosen on the basis of an empirically determined regional upper limit. If L is set too high, the model will underestimate turbidity at high values; if L is set too low, the model will overestimate turbidity at high values, leading to systematic bias at the extremes of the turbidity range. In practical applications, optimization methods can be used to determine the optimal L.
5. Conclusion and Educational Implications
Using glacial lake turbidity retrieval as the application background, this paper demonstrates how the logistic regression equation can be used to handle nonlinear relationships. The core steps include:
1) Identifying nonlinearity: selecting the logistic function according to the problem background;
2) Variable transformation: linearizing the curve through the Logit transformation;
3) Linear modeling: estimating parameters using the least squares method;
4) Inverse prediction transformation: converting back to the original scale and evaluating results.
This process is an effective extension of basic mathematics: from linear regression to nonlinear fitting, and from simple functions to composite functions, it reflects the flexibility of mathematical modeling. For secondary school students, the implications of this study are as follows:
Many natural phenomena have nonlinear characteristics, but they can be transformed into linear problems through appropriate transformations.
Logistic regression is not only a classification tool; the logistic function behind it is also suitable for describing growth processes.
The core of mathematical modeling is choosing a functional form that fits the real-world background, rather than blindly applying formulas.