Description Usage Arguments Value Examples
This function is a helper function to return a bad input score for LauraeML
during a training iteration of the optimizer, specifically used when you have no features during training.
1 | LauraeML_utils.badscore(maximize, score = 9999999)
|
maximize |
Type: boolean. The |
score |
Type: numeric. The score to optimize. |
A so bad input score you better avoid such thing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# What if we have no feature selected?
if (sum(y) == 0) {
# Logging specific
LauraeML_utils.badlog(logging, x, y, score = NA)
# Last, we return an absurd score which is so high
# you would rather have a random model than this 0-feature model
#
# This iteration will be ignored by the optimizer if
# it does not belong to the elite proportion of the optimization iteration
# which should be obviously true
return(LauraeML_utils.badinput(maximize,
score = 9999999))
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.