Skip to content

Commit 9b396a0

Browse files
committed
remvoe tibble warning
1 parent a9d2fbc commit 9b396a0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/testthat/test_linear_reg_keras.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ test_that('model fitting', {
3030
expect_error(
3131
fit1 <-
3232
fit_xy(
33-
basic_mod,
34-
control = ctrl,
35-
x = iris[,2:4],
36-
y = iris$Sepal.Length
37-
),
33+
basic_mod,
34+
control = ctrl,
35+
x = iris[,2:4],
36+
y = iris$Sepal.Length
37+
),
3838
regexp = NA
3939
)
4040

@@ -119,10 +119,10 @@ test_that('regression prediction', {
119119
y = iris$Sepal.Length
120120
)
121121

122-
keras_pred <-
123-
predict(rr_fit$fit, as.matrix(iris[1:3,2:4])) %>%
124-
as_tibble() %>%
125-
setNames(".pred")
122+
keras_pred <- predict(rr_fit$fit, as.matrix(iris[1:3,2:4]))
123+
colnames(keras_pred) <- ".pred"
124+
keras_pred <- as_tibble(keras_pred)
125+
126126
parsnip_pred <- predict(rr_fit, iris[1:3,2:4])
127127
expect_equal(as.data.frame(keras_pred), as.data.frame(parsnip_pred))
128128

0 commit comments

Comments
 (0)