|
7 | 7 | - `rmse()`, a numeric metric | direction: minimize |
8 | 8 | - `rsq()`, a numeric metric | direction: maximize |
9 | 9 |
|
| 10 | +--- |
| 11 | + |
| 12 | + Code |
| 13 | + check_metrics_arg(rmse, wflow) |
| 14 | + Condition |
| 15 | + Error: |
| 16 | + ! The `metrics` argument should have class <metric_set>, not <numeric_metric/metric/function>. |
| 17 | + |
10 | 18 | --- |
11 | 19 |
|
12 | 20 | Code |
|
21 | 29 | check_metrics_arg(met_cls, wflow) |
22 | 30 | Condition |
23 | 31 | Error: |
24 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 32 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
25 | 33 |
|
26 | 34 | --- |
27 | 35 |
|
28 | 36 | Code |
29 | 37 | check_metrics_arg(met_mix_int, wflow) |
30 | 38 | Condition |
31 | 39 | Error: |
32 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 40 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
33 | 41 |
|
34 | 42 | --- |
35 | 43 |
|
36 | 44 | Code |
37 | 45 | fit_resamples(wflow, rs, metrics = met_cls) |
38 | 46 | Condition |
39 | 47 | Error in `fit_resamples()`: |
40 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 48 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
41 | 49 |
|
42 | 50 | --- |
43 | 51 |
|
44 | 52 | Code |
45 | 53 | fit_resamples(wflow, rs, metrics = met_mix_int) |
46 | 54 | Condition |
47 | 55 | Error in `fit_resamples()`: |
48 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 56 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
49 | 57 |
|
50 | 58 | --- |
51 | 59 |
|
52 | 60 | Code |
53 | 61 | tune_grid(wflow_tune, rs, metrics = met_cls) |
54 | 62 | Condition |
55 | 63 | Error in `tune_grid()`: |
56 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 64 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
57 | 65 |
|
58 | 66 | --- |
59 | 67 |
|
60 | 68 | Code |
61 | 69 | tune_grid(wflow_tune, rs, metrics = met_mix_int) |
62 | 70 | Condition |
63 | 71 | Error in `tune_grid()`: |
64 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 72 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
65 | 73 |
|
66 | 74 | --- |
67 | 75 |
|
68 | 76 | Code |
69 | 77 | tune_bayes(wflow_tune, rs, metrics = met_cls) |
70 | 78 | Condition |
71 | 79 | Error in `tune_bayes()`: |
72 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 80 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
73 | 81 |
|
74 | 82 | --- |
75 | 83 |
|
76 | 84 | Code |
77 | 85 | tune_bayes(wflow_tune, rs, metrics = met_mix_int) |
78 | 86 | Condition |
79 | 87 | Error in `tune_bayes()`: |
80 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 88 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
81 | 89 |
|
82 | 90 | --- |
83 | 91 |
|
84 | 92 | Code |
85 | 93 | last_fit(wflow, split, metrics = met_cls) |
86 | 94 | Condition |
87 | 95 | Error in `last_fit()`: |
88 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 96 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
89 | 97 |
|
90 | 98 | --- |
91 | 99 |
|
92 | 100 | Code |
93 | 101 | last_fit(wflow, split, metrics = met_mix_int) |
94 | 102 | Condition |
95 | 103 | Error in `last_fit()`: |
96 | | - ! The parsnip model has `mode` value of "regression", but the `metrics` is a metric set for a different model mode. |
| 104 | + ! The parsnip model has `mode` value of "regression", but the metric set for a different model mode. |
97 | 105 |
|
98 | 106 | # metric inputs are checked for classification models |
99 | 107 |
|
|
111 | 119 | check_metrics_arg(met_reg, wflow) |
112 | 120 | Condition |
113 | 121 | Error: |
114 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 122 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
115 | 123 |
|
116 | 124 | --- |
117 | 125 |
|
|
127 | 135 | check_metrics_arg(met_mix_int, wflow) |
128 | 136 | Condition |
129 | 137 | Error: |
130 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 138 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
131 | 139 |
|
132 | 140 | --- |
133 | 141 |
|
134 | 142 | Code |
135 | 143 | fit_resamples(wflow, rs, metrics = met_reg) |
136 | 144 | Condition |
137 | 145 | Error in `fit_resamples()`: |
138 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 146 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
139 | 147 |
|
140 | 148 | --- |
141 | 149 |
|
142 | 150 | Code |
143 | 151 | fit_resamples(wflow, rs, metrics = met_mix_int) |
144 | 152 | Condition |
145 | 153 | Error in `fit_resamples()`: |
146 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 154 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
147 | 155 |
|
148 | 156 | --- |
149 | 157 |
|
150 | 158 | Code |
151 | 159 | tune_grid(wflow_tune, rs, metrics = met_reg) |
152 | 160 | Condition |
153 | 161 | Error in `tune_grid()`: |
154 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 162 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
155 | 163 |
|
156 | 164 | --- |
157 | 165 |
|
158 | 166 | Code |
159 | 167 | tune_grid(wflow_tune, rs, metrics = met_mix_int) |
160 | 168 | Condition |
161 | 169 | Error in `tune_grid()`: |
162 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 170 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
163 | 171 |
|
164 | 172 | --- |
165 | 173 |
|
166 | 174 | Code |
167 | 175 | tune_bayes(wflow_tune, rs, metrics = met_reg) |
168 | 176 | Condition |
169 | 177 | Error in `tune_bayes()`: |
170 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 178 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
171 | 179 |
|
172 | 180 | --- |
173 | 181 |
|
174 | 182 | Code |
175 | 183 | tune_bayes(wflow_tune, rs, metrics = met_mix_int) |
176 | 184 | Condition |
177 | 185 | Error in `tune_bayes()`: |
178 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 186 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
179 | 187 |
|
180 | 188 | --- |
181 | 189 |
|
182 | 190 | Code |
183 | 191 | last_fit(wflow, split, metrics = met_reg) |
184 | 192 | Condition |
185 | 193 | Error in `last_fit()`: |
186 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 194 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
187 | 195 |
|
188 | 196 | --- |
189 | 197 |
|
190 | 198 | Code |
191 | 199 | last_fit(wflow, split, metrics = met_mix_int) |
192 | 200 | Condition |
193 | 201 | Error in `last_fit()`: |
194 | | - ! The parsnip model has `mode` value of "classification", but the `metrics` is a metric set for a different model mode. |
| 202 | + ! The parsnip model has `mode` value of "classification", but the metric set for a different model mode. |
195 | 203 |
|
196 | 204 | # metric inputs are checked for censored regression models |
197 | 205 |
|
|
207 | 215 | check_metrics_arg(met_reg, wflow) |
208 | 216 | Condition |
209 | 217 | Error: |
210 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 218 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
211 | 219 |
|
212 | 220 | --- |
213 | 221 |
|
214 | 222 | Code |
215 | 223 | check_metrics_arg(met_cls, wflow) |
216 | 224 | Condition |
217 | 225 | Error: |
218 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 226 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
219 | 227 |
|
220 | 228 | --- |
221 | 229 |
|
|
231 | 239 | fit_resamples(wflow, rs, metrics = met_cls) |
232 | 240 | Condition |
233 | 241 | Error in `fit_resamples()`: |
234 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 242 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
235 | 243 |
|
236 | 244 | --- |
237 | 245 |
|
238 | 246 | Code |
239 | 247 | fit_resamples(wflow, rs, metrics = met_reg) |
240 | 248 | Condition |
241 | 249 | Error in `fit_resamples()`: |
242 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 250 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
243 | 251 |
|
244 | 252 | --- |
245 | 253 |
|
246 | 254 | Code |
247 | 255 | tune_grid(wflow_tune, rs, metrics = met_cls) |
248 | 256 | Condition |
249 | 257 | Error in `tune_grid()`: |
250 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 258 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
251 | 259 |
|
252 | 260 | --- |
253 | 261 |
|
254 | 262 | Code |
255 | 263 | tune_grid(wflow_tune, rs, metrics = met_reg) |
256 | 264 | Condition |
257 | 265 | Error in `tune_grid()`: |
258 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 266 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
259 | 267 |
|
260 | 268 | --- |
261 | 269 |
|
262 | 270 | Code |
263 | 271 | tune_bayes(wflow_tune, rs, metrics = met_cls) |
264 | 272 | Condition |
265 | 273 | Error in `tune_bayes()`: |
266 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 274 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
267 | 275 |
|
268 | 276 | --- |
269 | 277 |
|
270 | 278 | Code |
271 | 279 | tune_bayes(wflow_tune, rs, metrics = met_reg) |
272 | 280 | Condition |
273 | 281 | Error in `tune_bayes()`: |
274 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 282 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
275 | 283 |
|
276 | 284 | --- |
277 | 285 |
|
278 | 286 | Code |
279 | 287 | last_fit(wflow, split, metrics = met_cls) |
280 | 288 | Condition |
281 | 289 | Error in `last_fit()`: |
282 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 290 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
283 | 291 |
|
284 | 292 | --- |
285 | 293 |
|
286 | 294 | Code |
287 | 295 | last_fit(wflow, split, metrics = met_reg) |
288 | 296 | Condition |
289 | 297 | Error in `last_fit()`: |
290 | | - ! The parsnip model has `mode` value of "censored regression", but the `metrics` is a metric set for a different model mode. |
| 298 | + ! The parsnip model has `mode` value of "censored regression", but the metric set for a different model mode. |
| 299 | + |
| 300 | +# metric inputs are checked for quantile regression models |
| 301 | + |
| 302 | + Code |
| 303 | + check_metrics_arg(NULL, wflow) |
| 304 | + Output |
| 305 | + A metric set, consisting of: |
| 306 | + - `weighted_interval_score()`, a quantile metric | direction: minimize |
| 307 | + |
| 308 | +--- |
| 309 | + |
| 310 | + Code |
| 311 | + check_metrics_arg(metric_set(rmse), wflow) |
| 312 | + Condition |
| 313 | + Error: |
| 314 | + ! The parsnip model has `mode` value of "quantile regression", but the metric set for a different model mode. |
| 315 | + |
| 316 | +--- |
| 317 | + |
| 318 | + Code |
| 319 | + check_metrics_arg(metric_set(weighted_interval_score), wflow) |
| 320 | + Output |
| 321 | + A metric set, consisting of: |
| 322 | + - `weighted_interval_score()`, a quantile metric | direction: minimize |
291 | 323 |
|
0 commit comments