Commit cf6229a
fix: map randomForest 'classification' type to 'class' in gg_variable class attr (#90)
randomForest stores family as object$type ("classification"), but the
plot.gg_variable dispatcher and the rfsrc path both use "class". Add an
explicit mapping so the class vector is consistent across engines and callers
never need to special-case "classification".
Adds one test verifying "class" is present and "classification" is absent.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7e4197c commit cf6229a
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
0 commit comments