R/print.R

Defines functions print.L0LearnCV print.L0Learn

Documented in print.L0Learn print.L0LearnCV

#' @title Print L0Learn.fit object
#'
#' @description Prints a summary of L0Learn.fit
#' @param x The output of L0Learn.fit or L0Learn.cvfit
#' @param ... ignore
#' @return Prints a summary of the models to the console.
#' @method print L0Learn
#' @export
print.L0Learn <- function(x, ...)
{
		gammas = rep(x$gamma, times=lapply(x$lambda, length) )
		data.frame(lambda = unlist(x["lambda"]), gamma = gammas, suppSize = unlist(x["suppSize"]), row.names = NULL)
}

#' @rdname print.L0Learn
#' @method print L0LearnCV
#' @export
print.L0LearnCV <- function(x, ...)
{
    print.L0Learn(x$fit)
}

Try the L0Learn package in your browser

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

L0Learn documentation built on March 7, 2023, 8:18 p.m.