We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcb1071 commit 1e525bbCopy full SHA for 1e525bb
tests/testthat/test-augment.R
@@ -76,3 +76,18 @@ test_that('classification models', {
76
77
})
78
79
+
80
+test_that('augment for model without class probabilities', {
81
+ skip_if_not_installed("LiblineaR")
82
83
+ data(two_class_dat, package = "modeldata")
84
+ x <- svm_linear(mode = "classification") %>% set_engine("LiblineaR")
85
+ cls_form <- x %>% fit(Class ~ ., data = two_class_dat)
86
87
+ expect_equal(
88
+ colnames(augment(cls_form, head(two_class_dat))),
89
+ c("A", "B", "Class", ".pred_class")
90
+ )
91
+ expect_equal(nrow(augment(cls_form, head(two_class_dat))), 6)
92
93
+})
0 commit comments