diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2017-01-25 14:03:38 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2017-01-25 14:03:38 +0100 |
| commit | 96e7bc6fdf292c7f73e599dae0b7957161e15212 (patch) | |
| tree | 1bedb98795b657ce51be2a6a79da7fe69435b00a /R | |
| parent | Add author and reference to each public method documentation (diff) | |
| download | sparsestep-96e7bc6fdf292c7f73e599dae0b7957161e15212.tar.gz sparsestep-96e7bc6fdf292c7f73e599dae0b7957161e15212.zip | |
Various documentation fixes
Diffstat (limited to 'R')
| -rw-r--r-- | R/coef.sparsestep.R | 7 | ||||
| -rw-r--r-- | R/path.sparsestep.R | 1 | ||||
| -rw-r--r-- | R/sparsestep-package.R | 10 | ||||
| -rw-r--r-- | R/sparsestep.R | 4 |
4 files changed, 17 insertions, 5 deletions
diff --git a/R/coef.sparsestep.R b/R/coef.sparsestep.R index 567b1f0..3ebbbc0 100644 --- a/R/coef.sparsestep.R +++ b/R/coef.sparsestep.R @@ -5,9 +5,10 @@ #' @param object a \code{sparsestep} object #' @param \dots further argument are ignored #' -#' @return The coefficients of the SparseStep model (i.e. the betas). If the -#' model was fitted with an intercept this will be the first value in the -#' resulting vector. +#' @return The coefficients of the SparseStep model (i.e. the betas) as a +#' dgCMatrix. If the model was fitted with an intercept this will be the first +#' row in the resulting matrix. +#' #' @author #' Gerrit J.J. van den Burg, Patrick J.F. Groenen, Andreas Alfons\cr #' Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com> diff --git a/R/path.sparsestep.R b/R/path.sparsestep.R index 429526f..01a9901 100644 --- a/R/path.sparsestep.R +++ b/R/path.sparsestep.R @@ -68,6 +68,7 @@ #' \emph{SparseStep: Approximating the Counting Norm for Sparse Regularization}, #' arXiv preprint arXiv:1701.06967 [stat.ME]. #' URL \url{https://arxiv.org/abs/1701.06967}. +#' #' @seealso #' \code{\link{coef}}, \code{\link{print}}, \code{\link{predict}}, #' \code{\link{plot}}, and \code{\link{sparsestep}}. diff --git a/R/sparsestep-package.R b/R/sparsestep-package.R index c1c5361..97fcd5b 100644 --- a/R/sparsestep-package.R +++ b/R/sparsestep-package.R @@ -38,6 +38,16 @@ #' arXiv preprint arXiv:1701.06967 [stat.ME]. #' URL \url{https://arxiv.org/abs/1701.06967}. #' +#' @examples +#' x <- matrix(rnorm(100*20), 100, 20) +#' y <- rnorm(100) +#' fit <- sparsestep(x, y) +#' plot(fit) +#' fits <- path.sparsestep(x, y) +#' plot(fits) +#' x2 <- matrix(rnorm(50*20), 50, 20) +#' y2 <- predict(fits, x2) +#' #' @name sparsestep-package #' @docType package #' @import Matrix diff --git a/R/sparsestep.R b/R/sparsestep.R index ef4ab22..f3c2901 100644 --- a/R/sparsestep.R +++ b/R/sparsestep.R @@ -1,6 +1,6 @@ -#' @title Fits the SparseStep model +#' @title Fit the SparseStep model #' -#' @description Fits the SparseStep model for a single value of the +#' @description Fits the SparseStep model for a chosen values of the #' regularization parameter. #' #' @param x matrix of predictors |
