Running ‘testthat.R’ [32s/47s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(live)
  Welcome to live v1.5.11. Live is a part of DALEXverse. Find out more at https://github.com/pbiecek/DALEX.
  > library(mlr)
  Loading required package: ParamHelpers
  > library(DALEX)
  Welcome to DALEX (version: 0.4.9).
  Find examples and detailed introduction at: https://pbiecek.github.io/PM_VEE/
  
  > library(data.table)
  > 
  > set.seed(1)
  > X <- as.data.frame(matrix(runif(5500), ncol = 11, nrow = 500))
  > X2 <- X
  > X2$V1 <- as.factor(as.character(X2$V1 > 0.5))
  > local <- sample_locally(data = X,
  +                          explained_instance = X[3, ],
  +                          explained_var = "V1",
  +                          size = 50)
  > local1 <- add_predictions(local, "regr.svm", X)
  > local_explained <- fit_explanation(local1, "regr.lm")
  > local_explained2 <- fit_explanation(local1, "regr.svm", kernel = identity_kernel)
  Warning message:
  In fit_explanation(local1, "regr.svm", kernel = identity_kernel) :
    Chosen method does not support weights.
  > 
  > X_old <- X
  > X2_old <- X_old
  > X2_old$V1 <- as.factor(as.character(X2_old$V1 > 0.5))
  > 
  > local2 <- sample_locally(data = X2, explained_instance = X2[3, ],
  +                           explained_var = "V1", size = 500)
  > local3 <- add_predictions(local2, "classif.svm", X2)
  > local_explained3 <- fit_explanation(local3, "classif.logreg", predict_type = "prob")
  Warning messages:
  1: glm.fit: algorithm did not converge 
  2: glm.fit: fitted probabilities numerically 0 or 1 occurred 
  > 
  > X$V3 <- as.factor(as.character(round(X$V3)))
  > local4 <- sample_locally(data = X,
  +                           explained_instance = X[3, ],
  +                           explained_var = "V1",
  +                           size = 50)
  > local4 <- add_predictions(local4, "regr.svm", X)
  > 
  > X_factors <- X
  > X_factors$V4 <- as.factor(as.character(round(X_factors$V4)))
  > 
  > count_diffs_in_rows <- function(table, row, explained_var) {
  +   col_no <- which(colnames(row) == explained_var)
  +   lapply(1:nrow(table), function(x) {
  +     row_of_table <- table[x, ]
  +     sum(row_of_table != row[, -col_no])
  +   }) %>%
  +     unlist() %>%
  +     sum()
  + }
  > 
  > test_check("live")
  ── 1. Failure: Shiny app is fine (@test_explaining.R#44)  ──────────────────────
  `live_shiny(X, e1071::svm(V1 ~ ., data = X))` produced warnings.
  
  Preparation of a new explainer is initiated
    -> model label       :  lm  ( [33m default [39m )
    -> data              :  1599  rows  12  cols 
    -> data              :  tibbble converted into a data.frame 
    -> target variable   :  1599  values 
    -> data              :  A column identical to the target variable `y` has been found in the `data`.  ( [31m WARNING [39m )
    -> data              :  It is highly recommended to pass `data` without the target variable column
    -> predict function  :  yhat.lm  will be used ( [33m default [39m )
    -> predicted values  :  numerical, min =  4.25011 , mean =  5.636023 , max =  7.476003  
    -> residual function :  difference between y and yhat ( [33m default [39m )
    -> residuals         :  numerical, min =  -2.688203 , mean =  -1.53081e-14 , max =  2.02255  
    -> model_info        :  package stats , ver. 4.0.0 , task regression ( [33m default [39m ) 
   [32m A new explainer has been created! [39m 
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 62 | SKIPPED: 0 | WARNINGS: 2 | FAILED: 1 ]
  1. Failure: Shiny app is fine (@test_explaining.R#44) 
  
  Error: testthat unit tests failed
  Execution halted