rauschenberger / palasso

@@ -50,7 +50,7 @@
Loading
50 50
#' n <- 50; p <- 20
51 51
#' y <- rbinom(n=n,size=1,prob=0.5)
52 52
#' X <- lapply(1:2,function(x) matrix(rnorm(n*p),nrow=n,ncol=p))
53 -
#' object <- palasso(y=y,X=X,family="binomial",standard=TRUE)
53 +
#' object <- palasso(y=y,X=X,family="binomial")
54 54
#' 
55 55
palasso <- function(y=y,X=X,max=10,...){
56 56
    

@@ -575,7 +575,7 @@
Loading
575 575
#' Use \link[palasso]{palasso} to fit the paired lasso.
576 576
#' 
577 577
#' @examples
578 -
#' \donttest{set.seed(1)
578 +
#' \dontrun{set.seed(1)
579 579
#' n <- 30; p <- 40
580 580
#' X <- matrix(rpois(n*p,lambda=3),nrow=n,ncol=p)
581 581
#' x <- palasso:::.prepare(X)

@@ -154,7 +154,7 @@
Loading
154 154
    cat("\n")
155 155
    
156 156
    # non-zero weights
157 -
    weights <- weights.palasso(object)
157 +
    weights <- weights.palasso(object,model=model)
158 158
    name <- colnames(weights)
159 159
    number <- colSums(weights!=0)
160 160
    cat("non-zero weights:",paste(number,name,collapse=", "),"\n\n")
@@ -163,13 +163,13 @@
Loading
163 163
    x <- subset.palasso(x=object,model=model)
164 164
    id <- list()
165 165
    id$min <- which(x$lambda==x$lambda.min)
166 -
    id$ose <- which(x$lambda==x$lambda.1se)
167 -
    frame <- matrix(NA,nrow=2,ncol=3)
166 +
    #id$ose <- which(x$lambda==x$lambda.1se)
167 +
    frame <- matrix(NA,nrow=length(id),ncol=3)
168 168
    frame[,1] <- vapply(id,function(i) x$lambda[i],numeric(1))
169 169
    frame[,2] <- vapply(id,function(i) x$nzero[i],integer(1))
170 170
    frame[,3] <- vapply(id,function(i) x$cvm[i],numeric(1))
171 -
    rownames(frame) <- c("min","1se")
172 -
    colnames(frame) <- c("lambda","nzero",names(x$name))
171 +
    rownames(frame) <- names(id) #c("min","1se")
172 +
    colnames(frame) <- c("lambda","nzero",x$name) # was names(x$name)
173 173
    base::print(round(frame,digits=2))
174 174
    return(invisible(NULL))
175 175
}
Files Coverage
R 31.93%
Project Totals (3 files) 31.93%
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