## 3 QSAR Today
### Model Validation: Internal Using the Training Dataset and External Using the Test Sataset
It is calculated using the following equation: \[\text{R}^{2}=1-\sum(y_{\text{calc}}-y_{\text{exp}})^{2}/\sum(y_{\text{exp}}-y_{ \text{mean}})^{2}=1-\text{SSR}/\text{SS}.\,.\] (5) where \(y_{\text{calc}}\) is the predicted value of the model, \(y_{\text{exp}}\) is the observed value, and \(y_{\text{mean}}\) is the mean observed value. SSR is the sum of squares of the residuals and SS is the total sum of squares. R\({}^{2}\) values range from 0 to 1, where values closer to 1 indicate a better fit. However, R\({}^{2}\) increases with model complexity, potentially causing overfitting when the number of descriptors exceeds the number of observations. * Predictive Squared Correlation Coefficient (Q\({}^{2}\)): Q\({}^{2}\), also known as the cross-validation correlation coefficient when LGO (Q\({}^{2}\)\({}_{\text{LGO}}\)) or LOO (Q\({}^{2}\)\({}_{\text{LOO}}\)) cross-validation is applied, is calculated as follows: \[\text{Q}^{2}=1-\sum(y_{\text{pred}}-y_{\text{exp}})^{2}/\sum(y_{\text{exp}}-y_ {\text{mean}})^{2}=1-\text{RESS}/\text{SS}.\,.\] (6) where \(y_{\text{pred}}\) is the predicted activity and PRESS is the predictive residual sum of squares. Q\({}^{2}\) values typically range from 0 to the R\({}^{2}\) value. A negative Q\({}^{2}\) indicates a non-predictive model. Values above 0.5 suggest a valid model, while values above 0.8 are considered excellent [153; 154]. If the margin between R\({}^{2}\) and Q\({}^{2}\) exceeds 0.2-0.3, this may signal chance correlations, irrelevant descriptors, or data outliers. * Root Mean Squared Error (RMSE): RMSE measures the standard deviation of residuals, indicating model accuracy: \[\text{RMSE}=\sqrt{\sum(y_{\text{calc}}-y_{\text{exp}})^{2}/n}=\sqrt{\text{SSR} /n}.\,.\] (7) where n is the number of observations. * Root Mean Squared Error of Prediction (RMSEP): RMSEP has the same meaning as RMSE but corresponds to Q\({}^{2}\). It is calculated as follows: \[\text{RMSE}=\sqrt{\sum(y_{\text{pred}}-y_{\text{exp}})^{2}/n}=\sqrt{\text{ PRESS}/n}.\,.\] (8)  
Both RMSE and RMSEP provide insight into the model's accuracy relative to the measurement error in the original response data. High Q\({}^{2}\) values alone do not guarantee model validity. If the dataset contains duplicate compounds or clusters of similar compounds, the model may be overfitted with an artificially high Q\({}^{2}\). Similarly, if the scientist conducts excessive parameter tuning or variable selection, the internal cross-validation results may be misleading due to chance correlations. External validation addresses this issue by testing the model on an independent dataset that was set aside before model development. This dataset is never used in model training. The key external validation parameters are as follows:  
* \(\text{Q}^{2}\textsubscript{test}\) (or \(\text{Q}^{2}\textsubscript{ext}\)): calculated using the same equation as \(\text{Q}^{2}\) (Equation (6)) but applied to the test dataset. * \(\text{RMSEP}\textsubscript{test}\): Similarly to RMSEP (Equation (8)) but applied to the test dataset. If the \(\text{Q}^{2}\textsubscript{test}\) value is reasonably similar to \(\text{Q}^{2}\), along with valid \(\text{R}^{2}\) and \(\text{Q}^{2}\) values, the QSAR model is considered valid. If \(\text{Q}^{2}\textsubscript{test}\) is significantly lower than \(\text{Q}^{2}\), the model is likely overfitted, requiring further refinement. The most popular measures for assessing QSAR model performance are \(\text{R}^{2}\) and RMSE for goodness-of-fit, \(\text{Q}^{2}\textsubscript{LGO}\) or \(\text{Q}^{2}\textsubscript{LGO}\) for robustness, and \(\text{Q}^{2}\textsubscript{test}\) and \(\text{RMSEP}\textsubscript{test}\) for predictivity. These parameters ensure a well-validated and reliable QSAR model. For further reading, see references [153; 154; 155; 156; 157; 158]. Model Interpretation and Prediction: Interpret the Model Results and Apply the Model for Predictions  
A validated QSAR model can be used for both prediction and interpretation.