Compare 5088cf9 ... +0 ... f59137e

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 2 of 11 files from the diff.

@@ -43,25 +43,44 @@
Loading
43 43
44 44
  # get lambda sequence -----------------------------------------------------
45 45
46 -
  lamb <- lambdalasso(ggmix_object,
47 -
    penalty.factor = penalty.factor,
48 -
    nlambda = nlambda,
49 -
    lambda_min_ratio = lambda_min_ratio,
50 -
    eta_init = eta_init,
51 -
    epsilon = epsilon
52 -
  )
46 +
  if (is.null(lambda)) {
47 +
    
48 +
    if (lambda_min_ratio >= 1) stop("lambda_min_ratio should be less than 1")
49 +
    
50 +
    lamb <- lambdalasso(ggmix_object,
51 +
                        penalty.factor = penalty.factor,
52 +
                        nlambda = nlambda,
53 +
                        lambda_min_ratio = lambda_min_ratio,
54 +
                        eta_init = eta_init,
55 +
                        epsilon = epsilon
56 +
    )
57 +
    
58 +
    lambda_max <- lamb$sequence[[1]]
59 +
    lamb$sequence[[1]] <- .Machine$double.xmax
60 +
    
61 +
    tuning_params_mat <- matrix(lamb$sequence, nrow = 1, ncol = nlambda, byrow = T)
62 +
    dimnames(tuning_params_mat)[[1]] <- list("lambda")
63 +
    dimnames(tuning_params_mat)[[2]] <- paste0("s", seq_len(nlambda))
64 +
    lambda_names <- dimnames(tuning_params_mat)[[2]]
65 +
    
66 +
  } else {
67 +
    
68 +
    if (any(lambda < 0)) stop("lambdas should be non-negative")
69 +
    nlambda <- length(lambda)
70 +
    lambda <- as.double(rev(sort(lambda)))
71 +
    lambda_max <- lambda[[1]]
72 +
    
73 +
    tuning_params_mat <- matrix(lambda, nrow = 1, ncol = nlambda, byrow = T)
74 +
    dimnames(tuning_params_mat)[[1]] <- list("lambda")
75 +
    dimnames(tuning_params_mat)[[2]] <- paste0("s", seq_len(nlambda))
76 +
    lambda_names <- dimnames(tuning_params_mat)[[2]]
77 +
  }
53 78
54 -
  lambda_max <- lamb$sequence[[1]]
55 79
56 -
  lamb$sequence[[1]] <- .Machine$double.xmax
57 80
58 81
59 -
  # create matrix to store results ------------------------------------------
60 82
61 -
  tuning_params_mat <- matrix(lamb$sequence, nrow = 1, ncol = nlambda, byrow = T)
62 -
  dimnames(tuning_params_mat)[[1]] <- list("lambda")
63 -
  dimnames(tuning_params_mat)[[2]] <- paste0("s", seq_len(nlambda))
64 -
  lambda_names <- dimnames(tuning_params_mat)[[2]]
83 +
  # create matrix to store results ------------------------------------------
65 84
66 85
  coefficient_mat <- matrix(
67 86
    nrow = p_design + 3,

@@ -92,7 +92,7 @@
Loading
92 92
#' @param epsilon Convergence threshold for block relaxation of the entire
93 93
#'   parameter vector \eqn{\Theta = ( \beta, \eta, \sigma^2 )}. The algorithm
94 94
#'   converges when \deqn{crossprod(\Theta_{j+1} - \Theta_{j}) < \epsilon}.
95 -
#'   Defaults value is 1E-7
95 +
#'   Defaults value is 1E-4
96 96
#' @param verbose display progress. Can be either 0,1 or 2. 0 will not display
97 97
#'   any progress, 2 will display very detailed progress and 1 is somewhere in
98 98
#'   between. Default: 0.

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 0.12% 68.32%
Project Totals (13 files) 68.32%
Loading