## 3 Materials and Methods
### Model Development  
Freshwater lake trophic levels are widely classified using Chl-a, total phosphorus, and levels of clarity [60], into oligotrophic, mesotrophic, and eutrophic (low, medium and high biotic productivity, respectively). The boundary between mesotrophic and eutrophic lakes in New York is 8 \(\upmu\)g/L Chl-a, measured on the average summer epilimnetic concentration of Chl-a [61]. Such a classification is an important indicator for lake management. No such trophic level boundary is available for phycocyanin, but preliminary analysis demonstrated that model accuracy improved when excluding phycocyanin data below 8 \(\upmu\)g/L. We have chosen one other threshold for Chl-a and phycocyanin, at 24 \(\upmu\)g/L, to allow further refinement of our analysis and permit simple and clear discussion (values above 24 \(\upmu\)g/L referred to as 'high'), but this latter threshold is not a trophic level boundary. None of these thresholds are regulatory and do not represent water quality standards in New York. We used a phased approach to develop the empirical models in this study (Figure 2). We used empirical linear regression models to characterize the relationship between in situ observations of Chl-a and phycocyanin and image-based indices, developing models in Python 3.8.8 using different libraries such as pandas, numpy, matplotlib, and scikit-learn within a Jupyter notebook 6.3.0. In a preliminary evaluative phase, we used CSLAP in situ data from 2019 to develop models based on all available data and assessed models using R\({}^{2}\) (Equation (1)) to make an initial selection of the model inputs. In the main phase, we developed models using the CSLAP in situ data from 2019 to 2020 above 8 \(\upmu\)g/L, after randomly dividing these in situ data into training (70%) and testing (30%) components. We evaluated model fit in the second phase using R\({}^{2}\), RMSE (Equation (2)), and bias (MBE; Equation (3)) based on the training dataset [24]. Having selected an optimal model, its predictive capability was explored and validated by applying the model to the testing dataset and calculating R\({}^{2}\), RMSE, and bias. \[R^{2}=1-\frac{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}{\sum_{i=1}^{n}(y_{i}-\overline {y})^{2}} \tag{1}\]  
\[\text{RMSE}=\sqrt{\frac{1}{n}{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}} \tag{2}\]  
\[\text{MBE}=\frac{1}{n}{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})} \tag{3}\]  
where \(y_{i}\) is the \(i\)th observed value, \(\hat{y}_{i}\) is the \(i\)th predicted value, \(\overline{y}\) is the mean value of observed values, and \(n\) is the number of observations. We also characterized the predictive capability of the models, using confidence and prediction intervals [62]. A prediction interval includes a wider range of values than a confidence interval and relates to individual points, whereas a confidence interval relates to the mean value. The goal was to select an optimal algorithm with a strong model fit, but also having narrow prediction and confidence intervals to provide greater confidence in the model application. Figure 2 shows a flowchart of the various steps in the development of a retrieval model. The simplest empirical algorithm is expressed as a linear regression model [8]:  
\[\text{Prediction}=a+b\times SP_{index} \tag{4}\]  
where \(a\) and \(b\) are model parameters, and \(SP_{index}\) is a spectral index defined by two or more spectral bands of satellite imagery. Parameters \(a\) and \(b\) are calibrated by regressing between in situ measurements and the spectral index (\(SP_{index}\)) calculated from pixels of the Sentinel-2 L2A images at the sample site locations. Preliminary analysis found low concentration in situ field measurements of Chl-a and phycocyanin led to poor fit when establishing a linear regression model. Hence, we tested using different in situ parameter thresholds when calibrating the model. We tested the importance of the temporal alignment of datasets by merging the field and satellite data in two different ways.