Description Usage Arguments Details See Also Examples
A validation set based stop criterion for TrainIBHM
function creating IBHM approximation models. Should be passed to ConfigureIBHM
while creating a configuration object.
1 | ValidationSC(x, y)
|
x |
Validation set input arguments, should be convertible to a |
y |
Validation set predicted argument, should be convertible to a single column |
The criterion is checked after each iteration and the current model is used to predict values on the validation data set. When the error increases in comparison to the previous iteration, the construction process is stopped, and the changes in the model from the last iteration are undone.
IterationSC
,ConfigureIBHM
, TrainIBHM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Training data
x <- seq(-3,3,length.out=400)
y <- tanh(x)
# A held out validation set for the stop criterion
x.val <- runif(50,min=-6,max=6)
y.val <- tanh(x.val)
# Training the model using the validation set to prevent overfitting
m <- TrainIBHM(x,y,
ConfigureIBHM(stop.criterion = ValidationSC(x.val, y.val))
)
summary(m)
plot(y.val,predict(m,x.val),asp=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.