Skip to content

Model Training Settings

The platform's number of components is selected automatically — after you click Fit, the system runs cross-validation and automatically finds the best number of components. The behavior of this automatic search can be adjusted through the global model training settings.

Entry: Top toolbar → Settings ⚙️ → the Model Training Settings item in the left menu

⚠️ The settings here take effect globally and affect the training of all subsequent models (they are not applied retroactively to models that have already been trained).


🎛️ The Seven Parameters

The settings panel is divided into three groups: validation parameters → PCA thresholds → supervised model thresholds. All parameter changes are saved immediately, with the message "Training settings updated".

Group 1: Validation and search control

ParameterRangeDefaultMeaning
Cross-validation folds (CV_SPLITS)2 ~ 207The number of K-fold cross-validation runs used to evaluate the model's predictive performance
Maximum component limit (MAX_COMPONENTS_LIMIT)1 ~ 10020The algorithm's hard upper limit on the number of components, preventing memory blow-ups or overfitting caused by too many components
Early-stopping patience (PATIENCE)1 ~ 102Stop the search early after several consecutive component additions fail to meet the bar

💡 How to choose among the three parameters?

  • Cross-validation folds: with a large sample size and a desire for faster runs → lower it to 5; with a small sample size and a desire for a more stable Q² → raise it to 10 or even higher. The higher the number of folds, the slower each training run.
  • Maximum component limit: this is a safety valve. The default of 20 is already sufficient for the vast majority of industrial data — if your model "wants" to use more than 20 components, it usually means the data is very noisy rather than that so many components are genuinely needed.
  • Early-stopping patience: raising it (such as 3~5) makes the search more "persistent" and may find a Q² peak that appears later, but training becomes slower; lowering it (to 1) stops immediately once there is no improvement.

Group 2: PCA thresholds

ParameterDefaultMeaning
PCA Q²X threshold0.010Used by PCA dimensionality reduction and denoising; how much the explained/predicted rate must be improved at minimum
PCA R²X threshold0.010How much the explained variance of the data must be improved at minimum

💡 These two thresholds control "when to stop". The default 0.010 means: if adding one more principal component cannot even bring a 1% improvement in the explained rate, it is not worth keeping. Want a leaner PCA → raise them; want to retain as much information as possible → lower them.

Group 3: Supervised model thresholds

ParameterDefaultMeaning
PLS/OPLS regression Q²Y threshold0.010Used for continuous variable prediction; how much Q²Y must be improved at minimum
PLS-DA/OPLS-DA classification AUC threshold0.005Classification tasks use AUC as the core metric; how much AUC must be improved at minimum

💡 Note that the default threshold for classification tasks is smaller (0.005): because the numeric variation range of AUC is naturally smaller than that of Q²Y, using the same scale would stop too early.


🧠 How the Platform Automatically Chooses the Number of Components

To understand what these parameters do, you first need to know the search logic behind the platform:

The whole search is controlled by two brakes:

  1. Early-stopping patience (PATIENCE) —— give up after N consecutive rounds without a clear improvement
  2. Maximum component limit —— a hard ceiling that prevents infinite searching

And the criterion for "is there a clear improvement" is the last four threshold parameters.


🔧 Common Tuning Scenarios

Symptom you encounterSuggested adjustment
Training is too slow and too many components are selectedLower the maximum component limit (such as 10)
The Fit result is unstable from run to runRaise the cross-validation folds (such as 10) to make the Q² estimate more stable
The optimal component count is clearly too small and Q² still has room to riseLower the Q²Y threshold (such as 0.005) so the search is more willing to continue
The optimal component count is on the high side, suspected overfittingRaise the Q²Y threshold (such as 0.02) to raise the bar for "worth adding a component"
PCA denoising is not enoughLower the PCA R²X / Q²X thresholds to keep more principal components
The classification model's AUC is stuck at a certain valueCheck whether the classes are extremely imbalanced rather than only tuning the threshold

⚠️ Remember to Fit again after tuning: these parameters only affect subsequent training. Existing models need you to click Fit (or C+1 / C-1) to refit before the new settings are applied.


🧩 Training Settings vs Manual C+1 / C-1

The two are complementary; don't confuse them:

ApproachScopeWhen to use
Training settings (this page)Global, persistentDetermines the behavioral rules of the "automatic search"; a one-time configuration
C+1 / C-1 (toolbar)A single model, immediateFine-tune one specific model and observe how Q² changes with the number of components

💡 Recommended workflow: first Fit a baseline model with the default training settings → use C+1/C-1 to manually explore the relationship between the number of components and Q² → if you find that the default automatic selection always "stops too early" or "goes too far", then go back to the training settings and adjust the thresholds.

⚠️ Special note for OPLS / OPLS-DA: for these two models the "number of components" is the number of orthogonal components, not the number of latent variables (the predictive component is fixed at 1). Therefore, for them the maximum component limit means "how many layers of orthogonal noise can be stripped out at most"; usually 1~3 is enough, and setting it very large is not recommended. See Core Model Algorithms Explained for details.


Let data speak, make decisions simpler.