Add vignette on tuning multiple similar parameters for autoplot uniqueness #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses a common pitfall when tuning Keras models with
kerasnip
and visualizing results usingggplot2::autoplot()
.Problem:
When a Keras model specification includes multiple parameters that map to the same underlying
dials
parameter type (e.g.,units
in differentlayer_dense
blocks),autoplot()
can fail. This occurs becauseautoplot()
cannot distinguish between these parameters without unique identifiers, leading to errors such as "Names must be unique" due to duplicated column names like "# Hidden Units".Solution:
articles/autoplot_uniqueness.Rmd
, which clearly explains the problem and demonstrates the solution.id
s fortune()
: The vignette emphasizes the importance of providing uniqueid
s to thetune()
function for each similar parameter (e.g.,dense1_units = tune(id = "dense_layer_one_units")
). This allowsautoplot()
to correctly differentiate and plot the tuning results for each distinct parameter.pkgdown
Integration: The_pkgdown.yml
file has been updated to include the new vignette in the navigation bar under the "Tuning" section.This change significantly improves the documentation by providing clear guidance on a crucial aspect of
kerasnip
usage, helping users avoid common visualization errors during model tuning.