R/print.ftrlprox.r

Defines functions print.ftrlprox

Documented in print.ftrlprox

##------------------------------------------------------------------------------
#' Print a ftrlprox model
#' 
#' Print a text represenation of the ftrlprox model.
#' 
#' @param x The model object to print
#' @param digits the number of digits display in printout.
#' @param zero.print the symbol to use in place of zeros
#' @param ... additional args
#' 
#' @author Vilhelm von Ehrenheim
#' @import Matrix
#' @export
#' @method print ftrlprox
##------------------------------------------------------------------------------
print.ftrlprox <- function(x, digits=getOption("digits"), zero.print=".", ...) {
  rn <- names(x$theta)
  theta <- Matrix(x$theta, sparse=T)
  rownames(theta) <- rn

  cat("\nCoefficients:")
  printSpMatrix(theta, digits=digits, zero.print=zero.print)
  cat("\n")
}

Try the FTRLProximal package in your browser

Any scripts or data that you put into this service are public.

FTRLProximal documentation built on May 29, 2017, 5:39 p.m.