resubLoss
Resubstitution regression loss
Description
returns the regression loss by resubstitution (L), or the in-sample regression loss, for the trained regression modelL
= resubLoss(Mdl
)Mdl
using the training data stored inMdl.X
and the corresponding responses stored inMdl.Y
.
The interpretation ofL
depends on the loss function ('LossFun'
) and weighting scheme (Mdl.W
). In general, better models yield smaller loss values. The default'LossFun'
value is'mse'
(mean squared error).
Examples
Input Arguments
More About
Algorithms
resubLoss
computes the regression loss according to the correspondingloss
function of the object (Mdl
). For a model-specific description, see theloss
function reference pages in the following table.
Model | Regression Model Object (Mdl ) |
loss Object Function |
---|---|---|
Gaussian process regression model | RegressionGP |
loss |
Generalized additive model | RegressionGAM |
loss |
Neural network model | RegressionNeuralNetwork |
loss |
Alternative Functionality
To compute the response loss for new predictor data, use the correspondingloss
function of the object (Mdl
).