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

@@ -160,20 +160,17 @@
Loading
160 160
        self$parnames <- c(self$parnames, pari$name)
161 161
        self$parlowerraw <- c(self$parlowerraw, pari$lower)
162 162
        self$parupperraw <- c(self$parupperraw, pari$upper)
163 -
        # browser()
164 163
        self$parlowertrans <- c(self$parlowertrans, pari$fromraw(pari$lower))
165 164
        self$paruppertrans <- c(self$paruppertrans, pari$fromraw(pari$upper))
166 165
        self$partrans <- c(self$partrans, pari$partrans)
167 166
      }
168 167
      self$parlist <- parlist
169 -
      # browser()
170 168
      if (!is.null(X0)) {
171 169
        stop("X0 not working yet, need to check with raw/trans")
172 170
      }
173 171
      X0trans <- NULL
174 172
      if (!missing(n_lhs)) {
175 173
        Xlhstrans <- lhs::maximinLHS(n=n_lhs, k=length(self$parnames))
176 -
        # browser()
177 174
        Xlhstrans <- sweep(sweep(Xlhstrans,
178 175
                                 2, self$paruppertrans - self$parlowertrans, "*"
179 176
        ), 2, self$parlowertrans, "+")
@@ -188,7 +185,6 @@
Loading
188 185
      if (!is.data.frame(X0trans)) {stop("X0 is not a df?")}
189 186
      # Convert transformed back to raw
190 187
      # X0raw <- X0trans
191 -
      # browser()
192 188
      X0raw <- self$convert_trans_to_raw(X0trans)
193 189
      # for (i in 1:ncol(X0trans)) {
194 190
      #   X0raw[, i] <- parlist[[i]]$toraw(X0trans[, i])
@@ -236,7 +232,6 @@
Loading
236 232
      Xlhstrans <- as.data.frame(Xlhstrans)
237 233
      names(Xlhstrans) <- self$parnames
238 234
      # Convert trans to raw
239 -
      # browser()
240 235
      Xlhsraw <- self$convert_trans_to_raw(Xlhstrans)
241 236
      self$add_X(Xlhsraw)
242 237
      invisible(self)
@@ -299,7 +294,6 @@
Loading
299 294
      if (covtype == "random") {
300 295
        covtype <- sample(c("matern5_2", "matern3_2", "exp", "powexp", "gauss"), 1)
301 296
      }
302 -
      # browser()
303 297
      self$mod <- DiceKriging::km(formula = ~1,
304 298
                                  covtype=covtype,
305 299
                                  design = Xtrans,
@@ -387,9 +381,8 @@
Loading
387 381
    },
388 382
    #' @description Plot pairs of inputs and output
389 383
    pairs = function() {
390 -
      # stop("Fix pairs for Xtrans")
384 +
      # Before changing to transformed coordinates
391 385
      # GGally::ggpairs(cbind(self$X, Z=self$Z))
392 -
      # browser()
393 386
      df <- cbind(self$X, Z=self$Z)
394 387
      ggs <- list()
395 388
      for (i in 1:ncol(df)) {
@@ -402,14 +395,16 @@
Loading
402 395
              p <- p + ggplot2::scale_x_continuous(trans = self$parlist[[i]]$ggtrans)
403 396
            }
404 397
          } else {
405 -
            p <- ggplot2::ggplot(df, ggplot2::aes_string(si, sj)) + ggplot2::geom_point()
398 +
            p <- ggplot2::ggplot(df, ggplot2::aes_string(si, sj, color=colnames(df)[ncol(df)])) +
399 +
              ggplot2::geom_point() +
400 +
              ggplot2::theme(legend.position = "none") +
401 +
              ggplot2::scale_color_gradientn(colors=c('green', 'purple'))
406 402
            if (i < ncol(df)) {
407 403
              p <- p + ggplot2::scale_x_continuous(trans = self$parlist[[i]]$ggtrans)
408 404
            }
409 405
            if (j < ncol(df)) {
410 406
              p <- p + ggplot2::scale_y_continuous(trans = self$parlist[[j]]$ggtrans)
411 407
            }
412 -
              #
413 408
          }
414 409
          if (i > 1) {
415 410
            p <- p + ggplot2::ylab(NULL)
@@ -461,7 +456,6 @@
Loading
461 456
                               response = self$Z,
462 457
                               nugget.estim=nugget.estim,
463 458
                               control=list(trace=FALSE))
464 -
        # browser()
465 459
        for (i in 1:ncol(self$X)) {
466 460
          # Predict at points that are the same for all other components
467 461
          predXtrans <- matrix(rep(unlist(min_Xtrans), npts), ncol=ncol(self$X), byrow=T)
@@ -479,7 +473,6 @@
Loading
479 473
          preddf <- rbind(preddf, df_i)
480 474
        }
481 475
      }
482 -
      # browser()
483 476
      # p <- ggplot2::ggplot(reshape2::melt(tdf, id.vars=c('Z', 'Rank')),
484 477
      #                      ggplot2::aes(value, Z, color=Rank))
485 478
      # if (addlines) {
Files Coverage
R 77.69%
Project Totals (4 files) 77.69%
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