R² measures how well a fitted model accounts for variation in the target. It ranges from 0 for poor fit to 1 for perfect fit, but can be negative on test data. section 4.1.4
Use R² with care when comparing models:
- Higher R² indicates a better fit to observed data, but R² never decreases when features are added, even when they are unhelpful. section 4.1.4
- Compare adjusted R² when model size matters; unlike R², it decreases when an added feature fails to improve the model beyond chance. section 4.1.4
- Separate fit from prediction: QSAR candidates were screened with training R² and unseen-data Q², a predictive counterpart to R². section 6.3.1
Solubility and ligand-binding models
A linear regression predicts solubility from logP and evaluates predictions with scikit-learn’s r2_score. In a small QSAR workflow, Lasso selects descriptors, cross-validation selects models, and candidates must achieve R² > 0.7 on training data and Q² > 0.7 on unseen data. section 4.1.4 section 6.3.1
Inspect the compact equation connecting R² to mean squared error and target variance. section 4.1.4








