I am trying to do the hyperparameter tuning by using random search algorithm. When trying out the mlpWeightDecayML model, it seems that there is an underlying problem with implementation how the search algorithm works with this model.
Note: I have noticed this only with this model, any other I tried worked fine. Also, I have been playing with adaptive resampling and there is a same problem.
If I set the seed to 5 and take a look at the output, everything looks normal:
If I try a different seed, for example 6, it doesn't seem to work:
data(iris)
set.seed(6)
caretModel = caret::train(
x = iris[, -ncol(iris)],
y = iris[, ncol(iris)],
method = "mlpWeightDecayML",
tuneLength = 5,
trControl = caret::trainControl(method="cv", search="random", number=2, verboseIter = TRUE)
)
# + Fold1: layer1=14, layer2= 2, layer3= 0, decay=3.063e+00
# + Fold1: layer1=15, layer2= 2, layer3=10, decay=4.430e-04
# - Fold1: layer1=15, layer2= 2, layer3=10, decay=4.430e-04
# + Fold1: layer1= 5, layer2= 3, layer3= 7, decay=3.981e-03
# - Fold1: layer1= 5, layer2= 3, layer3= 7, decay=3.981e-03
# + Fold1: layer1= 4, layer2= 8, layer3= 2, decay=1.351e-02
# - Fold1: layer1= 4, layer2= 8, layer3= 2, decay=1.351e-02
# + Fold1: layer1= 3, layer2=17, layer3=18, decay=5.715e-05
# - Fold1: layer1= 3, layer2=17, layer3=18, decay=5.715e-05
# + Fold2: layer1=14, layer2= 2, layer3= 0, decay=3.063e+00
# + Fold2: layer1=15, layer2= 2, layer3=10, decay=4.430e-04
# - Fold2: layer1=15, layer2= 2, layer3=10, decay=4.430e-04
# + Fold2: layer1= 5, layer2= 3, layer3= 7, decay=3.981e-03
# - Fold2: layer1= 5, layer2= 3, layer3= 7, decay=3.981e-03
# + Fold2: layer1= 4, layer2= 8, layer3= 2, decay=1.351e-02
# - Fold2: layer1= 4, layer2= 8, layer3= 2, decay=1.351e-02
# + Fold2: layer1= 3, layer2=17, layer3=18, decay=5.715e-05
# - Fold2: layer1= 3, layer2=17, layer3=18, decay=5.715e-05
# Error in { :
# task 1 failed - "arguments imply differing number of rows: 0, 75"
# In addition: Warning messages:
# 1: At least one layer had zero units and were removed. The new structure is 14->2
# 2: At least one layer had zero units and were removed. The new structure is 14->2
After inspecting the output, I have noticed something strange. In the first example, the tuning iterations look normal, one starts and then finishes ('+' and then '-' at the beginning of the line). But if you take a look at the second example, it is not chronological. First two lines of the output are the beginnings of iterations (first one did not finish) and then at the beginning of Fold2, the same thing happened. I am not sure what is the underlining problem. I have tried changing datasets, different trainControl parameters but there is a pattern that, when this error happens, the iteration output is a bit messy.
I am trying to do the hyperparameter tuning by using random search algorithm. When trying out the mlpWeightDecayML model, it seems that there is an underlying problem with implementation how the search algorithm works with this model.
Note: I have noticed this only with this model, any other I tried worked fine. Also, I have been playing with adaptive resampling and there is a same problem.
If I set the seed to 5 and take a look at the output, everything looks normal:
If I try a different seed, for example 6, it doesn't seem to work:
After inspecting the output, I have noticed something strange. In the first example, the tuning iterations look normal, one starts and then finishes ('+' and then '-' at the beginning of the line). But if you take a look at the second example, it is not chronological. First two lines of the output are the beginnings of iterations (first one did not finish) and then at the beginning of Fold2, the same thing happened. I am not sure what is the underlining problem. I have tried changing datasets, different trainControl parameters but there is a pattern that, when this error happens, the iteration output is a bit messy.
Session Info: