CollinErickson / comparer
Showing 1 of 3 files from the diff.
Other files ignored by Codecov

@@ -175,7 +175,7 @@
Loading
175 175
        Xlhstrans <- lhs::maximinLHS(n=n_lhs, k=length(self$parnames))
176 176
        # browser()
177 177
        Xlhstrans <- sweep(sweep(Xlhstrans,
178 -
                            2, self$paruppertrans - self$parlowertrans, "*"
178 +
                                 2, self$paruppertrans - self$parlowertrans, "*"
179 179
        ), 2, self$parlowertrans, "+")
180 180
        Xlhstrans <- as.data.frame(Xlhstrans)
181 181
        names(Xlhstrans) <- self$parnames
@@ -231,7 +231,7 @@
Loading
231 231
    add_LHS = function(n) {
232 232
      Xlhstrans <- lhs::maximinLHS(n=n, k=length(self$parnames))
233 233
      Xlhstrans <- sweep(sweep(Xlhstrans,
234 -
                          2, self$paruppertrans - self$parlowertrans, "*"
234 +
                               2, self$paruppertrans - self$parlowertrans, "*"
235 235
      ), 2, self$parlowertrans, "+")
236 236
      Xlhstrans <- as.data.frame(Xlhstrans)
237 237
      names(Xlhstrans) <- self$parnames
@@ -316,10 +316,10 @@
Loading
316 316
        # Select multiple points to be evaluated, useful when running in parallel
317 317
        # Suppress "Stopped because hard maximum generation limit was hit."
318 318
        EIout <- suppressWarnings(DiceOptim::max_qEI(model=self$mod,
319 -
                                    npoints=n,
320 -
                                    crit="CL", # exact was very slow for more than a couple
321 -
                                    lower=self$parlowertrans,
322 -
                                    upper=self$paruppertrans))
319 +
                                                     npoints=n,
320 +
                                                     crit="CL", # exact was very slow for more than a couple
321 +
                                                     lower=self$parlowertrans,
322 +
                                                     upper=self$paruppertrans))
323 323
      }
324 324
      newXtrans <- EIout$par
325 325
      newXraw <- self$convert_trans_to_raw(newXtrans)
@@ -387,8 +387,45 @@
Loading
387 387
    },
388 388
    #' @description Plot pairs of inputs and output
389 389
    pairs = function() {
390 -
      stop("Fix pairs for Xtrans")
391 -
      GGally::ggpairs(cbind(self$X, Z=self$Z))
390 +
      # stop("Fix pairs for Xtrans")
391 +
      # GGally::ggpairs(cbind(self$X, Z=self$Z))
392 +
      # browser()
393 +
      df <- cbind(self$X, Z=self$Z)
394 +
      ggs <- list()
395 +
      for (i in 1:ncol(df)) {
396 +
        for (j in 1:ncol(df)) {
397 +
          si <- colnames(df)[i]
398 +
          sj <- colnames(df)[j]
399 +
          if (i == j) {
400 +
            p <- ggplot2::ggplot(df, ggplot2::aes_string(si)) + ggplot2::geom_histogram(bins = 30)
401 +
            if (i < ncol(df)) {
402 +
              p <- p + ggplot2::scale_x_continuous(trans = self$parlist[[i]]$ggtrans)
403 +
            }
404 +
          } else {
405 +
            p <- ggplot2::ggplot(df, ggplot2::aes_string(si, sj)) + ggplot2::geom_point()
406 +
            if (i < ncol(df)) {
407 +
              p <- p + ggplot2::scale_x_continuous(trans = self$parlist[[i]]$ggtrans)
408 +
            }
409 +
            if (j < ncol(df)) {
410 +
              p <- p + ggplot2::scale_y_continuous(trans = self$parlist[[j]]$ggtrans)
411 +
            }
412 +
              #
413 +
          }
414 +
          if (i > 1) {
415 +
            p <- p + ggplot2::ylab(NULL)
416 +
          }
417 +
          if (i==1 && j==1) {
418 +
            p <- p + ggplot2::ylab(colnames(df)[1])
419 +
          }
420 +
          if (j < ncol(df)) {
421 +
            p <- p + ggplot2::xlab(NULL)
422 +
          }
423 +
          # ggs <- c(ggs, p)
424 +
          ggs[[(j-1) * ncol(df) + (i-1) + 1]] <- p
425 +
        }
426 +
      }
427 +
      # ggpubr
428 +
      do.call(ggpubr::ggarrange, ggs) #+ ggplot2::ylab("Outer ylab")
392 429
    },
393 430
    #' @description Plot the output of the points evaluated in order.
394 431
    plotorder = function() {
Files Coverage
R 77.63%
Project Totals (4 files) 77.63%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading