
Extract Valid Grid from Compilation Results
extract_valid_grid.Rd
This helper function filters the results from compile_keras_grid()
to
return a new hyperparameter grid containing only the combinations that
compiled successfully.
Arguments
- compiled_grid
A tibble, the result of a call to
compile_keras_grid()
.
Value
A tibble containing the subset of the original grid that resulted in
a successful model compilation. The compiled_model
and error
columns
are removed, leaving a clean grid ready for tuning.
Details
Filter a Grid to Only Valid Hyperparameter Sets
After running compile_keras_grid()
, you can use this function to remove
problematic hyperparameter combinations before proceeding to the full
tune::tune_grid()
.
Examples
if (FALSE) { # \dontrun{
# Continuing the example from `compile_keras_grid`:
# `compiled_grid` contains one row with an error.
valid_grid <- extract_valid_grid(compiled_grid)
# `valid_grid` now only contains the rows that compiled successfully.
print(valid_grid)
# This clean grid can now be passed to tune::tune_grid().
} # }