You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ggtitle("(b) Using a model-based smoother to discover trends.")
@@ -200,7 +200,7 @@ This iterative process is especially true for modeling. Figure \@ref(fig:softwar
200
200
201
201
***Feature engineering:** The understanding gained from EDA results in the creation of specific model terms that make it easier to accurately model the observed data. This can include complex methodologies (e.g., PCA) or simpler features (using the ratio of two predictors). Chapter \@ref(recipes) focuses entirely on this important step.
202
202
203
-
***Model tuning and selection (circles with blue and yellow segments):** A variety of models are generated and their performance is compared. Some models require _parameter tuning_ where some structural parameters are required to be specified or optimized. The colored segments within the circles signify the repeated data splitting used during resampling (see Chapter \@ref(resampling)).
203
+
***Model tuning and selection (circles with alternating segments):** A variety of models are generated and their performance is compared. Some models require _parameter tuning_ where some structural parameters are required to be specified or optimized. The colored segments within the circles signify the repeated data splitting used during resampling (see Chapter \@ref(resampling)).
204
204
205
205
***Model evaluation:** During this phase of model development, we assess the model's performance metrics, examine residual plots, and conduct other EDA-like analyses to understand how well the models work. In some cases, formal between-model comparisons (Chapter \@ref(compare)) help you to understand whether any differences in models are within the experimental noise.
Copy file name to clipboardExpand all lines: 12-tuning-parameters.Rmd
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -112,10 +112,10 @@ To demonstrate, consider the classification data shown in Figure \@ref(fig:two-c
112
112
#| echo = FALSE,
113
113
#| fig.cap = "An example two-class classification data set with two predictors.",
114
114
#| fig.alt = "An example two-class classification data set with two predictors. The two predictors have a moderate correlation and there is some locations of separation between the classes."
115
-
ggplot(training_set, aes(x = A, y = B, col = Class)) +
116
-
geom_point(alpha = .5) +
115
+
ggplot(training_set, aes(x = A, y = B, color = Class, pch = Class)) +
116
+
geom_point(alpha = 0.7) +
117
117
coord_equal() +
118
-
labs(x = "Predictor A", y = "Predictor B", col = NULL) +
118
+
labs(x = "Predictor A", y = "Predictor B", color = NULL, pch = NULL) +
ggplot(aes(y = id_alt, x = duration, fill = operation)) +
504
-
geom_bar(stat = "identity", col = "black") +
504
+
geom_bar(stat = "identity", color = "black") +
505
505
labs(y = NULL, x = "Elapsed Time") +
506
506
scale_fill_brewer(palette = "Paired") +
507
507
theme(legend.position = "top")
@@ -615,7 +615,7 @@ start_stop_dat %>%
615
615
ymax = id_stop,
616
616
fill = operation
617
617
),
618
-
col = "black"
618
+
color = "black"
619
619
) +
620
620
facet_wrap(~ pid, nrow = 2) +
621
621
labs(y = NULL, x = "Elapsed Time") +
@@ -653,8 +653,8 @@ First, let's consider the raw execution times in Figure \@ref(fig:parallel-times
653
653
#| fig.alt = "Execution times for model tuning versus the number of workers using different delegation schemes. The diagonal black line indicates a linear speedup where the addition of a new worker process has maximal effect. The 'everything' scheme shows that the benefits decrease after three or four workers, especially when there is expensive preprocessing. The 'resamples' scheme has almost linear speedups across all tasks."
654
654
655
655
load("extras/parallel_times/xgb_times.RData")
656
-
ggplot(times, aes(x = num_cores, y = elapsed, col = parallel_over, shape = parallel_over)) +
657
-
geom_point() +
656
+
ggplot(times, aes(x = num_cores, y = elapsed, color = parallel_over, shape = parallel_over)) +
657
+
geom_point(size = 2) +
658
658
geom_line() +
659
659
facet_wrap(~ preprocessing) +
660
660
labs(x = "Number of Workers", y = "Execution Time (s)") +
@@ -684,9 +684,9 @@ We can also view these data in terms of speed-ups in Figure \@ref(fig:parallel-s
684
684
#| fig.cap = "Speed-ups for model tuning versus the number of workers using different delegation schemes.",
685
685
#| fig.alt = "Speed-ups for model tuning versus the number of workers using different delegation schemes."
686
686
687
-
ggplot(times, aes(x = num_cores, y = speed_up, col = parallel_over, shape = parallel_over)) +
687
+
ggplot(times, aes(x = num_cores, y = speed_up, color = parallel_over, shape = parallel_over)) +
@@ -736,7 +736,7 @@ The process starts with initial values of `penalty = 0.025` and `mixture = 0.050
736
736
#| fig.alt = "An illustration of how simulated annealing determines what is the local neighborhood for two numeric tuning parameters. The clouds of points show possible next values where one would be selected at random. The candidate points are small circular clouds surrounding the current best point."
737
737
738
738
ggplot(neighbors_values, aes(x = penalty, y = mixture)) +
plot_top_loadings(component_number <= 4, n = 5, type = "pls") +
361
+
scale_fill_brewer(palette = "Paired") +
360
362
ggtitle("Partial Least Squares")
361
363
```
362
364
@@ -530,7 +532,7 @@ Figure \@ref(fig:dimensionality-rankings) illustrates this ranking.
530
532
#| fig.alt = "Area under the ROC curve from the validation set. The three best model configurations use PLS together with regularized discriminant analysis, a multi-layer perceptron, and a naive Bayes model."
531
533
532
534
rankings %>%
533
-
ggplot(aes(x = rank, y = mean, pch = method, col = model)) +
535
+
ggplot(aes(x = rank, y = mean, pch = method, color = model)) +
0 commit comments