Building a Model

Reading time

1. The Machine Learning Model and Its Matrix

A project contains as many as models as needed, displayed as tabs at the top of the page, with a «+» to create a new one. Each template has a name and refers to the grid that he operates, chosen specifically under his name.

⚠️ Changing a template's grid resets its X, Y, and test lines. This is by design: the columns in a different grid do not have to match. To compare two datasets, create two models.

2. Select the X and Y

The table on the left lists the columns in the grid, along with two columns of checkboxes, X and Y.

  • Y is the answer to predict. Check it Name the model according to her, and chooses the type of model right from the start : linear regression if Y is quantitative, logistic regression if it is qualitative.
  • X are the explanatory factors.

Three selection rules you should know:

  • a column constant cannot be X: its checkbox is disabled because, without variation, no effect can be estimated; ;
  • only the columns in Rehearsal 1 are offered in X; ;
  • A single column cannot be both X and Y: selecting one deselects the other.

3. Choose the type of template

The list of types depends on the nature of Y.

Quantitative Y

TypeWhat It Offers
Linear RegressionThe reference model: interpretable coefficients, p-values, R². This is the one we use for understand.
PLS RegressionFor a large number of interrelated X variables, where classical regression becomes unstable.
K-OPLS RegressionKernel version of the PLS: captures nonlinear relationships.
Gaussian processSmooth interpolation with confidence interval at every point. Excellent performance with limited data.
Neural networkMultilayer perceptron: highly nonlinear relationships, at the expense of interpretability.

Qualitative Y = We no longer predict a value, but rather a class :

TypeWhat It Offers
Logistic regressionCoefficients and p-values, as in linear regression. The baseline model for classification.
Decision TreeClear rules that can be directly translated into workshop instructions.
Random ForestSet of trees: more precise, less readable.
(SVM) Support Vector MachineComplex separation boundaries.
(KNN) K's closest neighborsClassification based on similarity to known cases.

Two types disappear on their own when they aren't applied:

  • the Gaussian process requires X all quantitative and at most 50 lines As the learning process progresses, the computational cost skyrockets; ;
  • the K-OPLS regression disappears in large tables (when there are more than 2,000 values in the selected columns).

💡 Get Started always using linear or logistic regression, even if nonlinearity is suspected. It provides p-values, an R² value, and interpretable coefficients: enough to determine which These factors matter. More flexible models sometimes make better predictions, but they do not answer the question, «What should we do about it?».

4. Options

Under the model type, the section Options displays the settings specific to the selected type (maximum depth and minimum number of nodes per leaf for a tree, number of trees and proportion of variables for a forest, gamma and cost for an SVM, learning rate, number of epochs, regularization, and hidden layer size for a neural network, and number of components for PLS).

⚠️ These settings have reasonable default values. Changing them haphazardly can lead to over-adjust : a model that perfectly replicates the training data but makes mistakes on any new part. This is the tab Model/Observation and the test lines that tell you whether you won or lost.

5. The Terms of the Template

In a regression analysis, the tab Coefficients It doesn't just read the template: that's where we composes. A term selector allows you to add the following to the main effects:

  • the quadratic terms : the square of a factor, to account for variability. This applies only to quantitative factors with more than two levels: for factors with two levels, a squared term is indistinguishable from the constant; ;
  • the interactions : the product of two factors; ;
  • the constant, which can be removed from the model if necessary.

The coefficient table lists, term by term: the coefficient, the’standard error, the statistics, the p-value, the conclusion significant and the VIF. Above that are the model's standard error, the n (ddl)the  and the Adjusted R², as well as the right side of the model, the complete equation, ready to copy.

💡 The VIF is the safeguard we tend to overlook. It measures the extent to which a term overlaps with others. A high VIF indicates that the reported coefficient is unreliable—not because the factor has no effect, but because the data do not allow us to distinguish its effect from that of another factor. This is common with observational data; in a well-designed experimental design, it should not occur.

You can delete a term either by removing it from the model's term table or by clicking «Delete.»

Automatic Analysis offers two strategies for selecting terms:

  • Moving Forward : Start with the empty model and add the relevant terms one by one; ;
  • Back : Start with the complete model and remove unnecessary terms.

The button Best subset goes a step further: it lists the combinations of terms up to a maximum number of terms that you set displays the number of regressions what this represents, and ranks the results by R² and adjusted R². Each candidate can apply with a single click.

⚠️ Automatic term selection invalidates the p-values Strictly speaking: we tested many models and selected the best one, which the p-value calculation does not take into account. The result remains an excellent starting point, but a model obtained in this way is confirms based on new data, not on the ones used to select him.

In the case of qualitative factors, you can select the reference category (included in the constant). The reference category does not appear in the Student's table.

6. Read the results

The right side of the screen displays the results in tabs. The first ones depend on the model; the rest are always there.

Model-Specific Tabs

TabWhen it appears
TaguchiEllistat has identified a Taguchi design in the data, and Y is a quantitative variable. Display the analysis specific to this design.
MultilevelThe data lend themselves to this: effects and significance of the terms on multilevel factors.
CoefficientsLinear or logistic regression (see §5).
ConfigurationPLS, K-OPLS, Gaussian process, neural network, tree, forest, SVM, KNN — type-specific diagnostics.

Common Tabs

TabWhat it shows
Model/ObservationPredicted vs. observed. On a qualitative Y-axis, this is the confusion matrix.
HistogramThe distribution, on quantitative Y.
ResiduesLine-by-line details: observed value, prediction, difference, and which test set each data point belongs to.
ForecastEnter values for X and read the predicted response.
3DAs soon as 2 X : the model's response surface.
5DAs soon as 4 X : the same interpretation, with two additional elements conveyed through color and size.

💡 "Model/Observation" is the only tab that evaluates the model. The points must line up along the diagonal, and most importantly The test lines must align with them as well. A model that perfectly predicts its training data but fails on the test set hasn’t learned anything—it has merely memorized the data. That’s the only error that matters, and R² doesn’t account for it.

7. Taguchi

In the case of a 2-level experimental design, the Taguchi table provides the effect plots for all columns in the table.

Select or deselect an interaction. Clicking on the name of a red interaction selects it, and it turns green. Similarly, clicking on the name of a green interaction turns it red. Selecting an interaction displays the corresponding interaction graph. You can change the x-axis by clicking on the blue dot.

8. Model / Observation

This graph illustrates the fit between the model and the observed data in various ways. The closer the data points are to the line, the better the model fits the data.

A very useful chart is the Leverage vs. Residuals chart. The points should be in the green.

If a data point is in the red—either below or above the line—it's due to an issue with the response. One of the responses doesn't fit the model (outlier?).

If a data point is in the red on the right side, then the problem lies with the X values. One of the test lines is atypical compared to the others (for example, X ranges from 5 to 10 across all lines except one, where X = 20).

9. Histogram of Residuals

Provide the histogram and the normality test for the residuals

This tab contains a table with the measured values, predicted values, and residual values.

But in this table, you can choose to either randomly select a portion of the rows for testing, or select the first ones, the last ones, or select rows from the "Test" column.

10. Forecast

This tab allows you to predict a response and its confidence interval based on the model for any configuration.

11. 3D and 5D Graphics

The 3D menu provides a 3D view of the response surface. Select 2 Xs and a specific configuration of the other Xs to display the visualization.

If there are enough X factors, the 5D view is offered, which allows you to see Y as a function of 4X in a single figure (5 dimensions)

The example below shows the power-versus-speed curve for 9 defocus/spot configurations. You can also use a 5×5 grid instead of a 3×3 grid for greater precision.