This object has the results when a neural network was tuned using Bayesian optimization and a validation set.
The code used to produce this object:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | data(ames)
ames <-
ames %>%
select(Sale_Price, Neighborhood, Longitude, Latitude, Year_Built) %>%
mutate(Sale_Price = log10(ames$Sale_Price))
set.seed(1)
ames_rs <- validation_split(ames)
ames_rec <-
recipe(Sale_Price ~ ., data = ames) %>%
step_dummy(all_nominal_predictors()) %>%
step_zv(all_predictors()) %>%
step_normalize(all_predictors())
mlp_spec <-
mlp(hidden_units = tune(),
penalty = tune(),
epochs = tune()) %>%
set_mode("regression")
set.seed(1)
ames_mlp_itr <-
mlp_spec %>%
tune_bayes(
ames_rec,
resamples = ames_rs,
initial = 5,
iter = 4,
control = control_bayes(save_pred = TRUE)
)
|
An object with primary class iteration_results
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.