fix: typos (in Doc comments)
This commit is contained in:
parent
92b1a49d2b
commit
10ae55bd81
|
@ -43,7 +43,7 @@
|
|||
#' supplied.
|
||||
#' @param method specifies the CVE method variation as one of
|
||||
#' \itemize{
|
||||
#' \item "simple" exact implementation as describet in the paper listed
|
||||
#' \item "simple" exact implementation as described in the paper listed
|
||||
#' below.
|
||||
#' \item "weighted" variation with addaptive weighting of slices.
|
||||
#' }
|
||||
|
@ -63,7 +63,7 @@
|
|||
#' dr <- cve(Y ~ X)
|
||||
#' round(dr[[2]]$B, 1)
|
||||
#'
|
||||
#' @seealso For a detailed description of the formula parameter see
|
||||
#' @seealso For a detailed description of \code{formula} see
|
||||
#' [\code{\link{formula}}].
|
||||
#' @export
|
||||
cve <- function(formula, data, method = "simple", max.dim = 10L, ...) {
|
||||
|
@ -90,16 +90,15 @@ cve <- function(formula, data, method = "simple", max.dim = 10L, ...) {
|
|||
#' @param nObs parameter for choosing bandwidth \code{h} using
|
||||
#' \code{\link{estimate.bandwidth}} (ignored if \code{h} is supplied).
|
||||
#' @param X data matrix with samples in its rows.
|
||||
#' @param Y Responces (1 dimensional).
|
||||
#' @param k Dimension of lower dimensional projection, if given only the
|
||||
#' specified dimension is estimated.
|
||||
#' @param Y Responses (1 dimensional).
|
||||
#' @param k Dimension of lower dimensional projection, if \code{k} is given only the specified dimension \code{B} matrix is estimated.
|
||||
#' @param min.dim lower bounds for \code{k}, (ignored if \code{k} is supplied).
|
||||
#' @param max.dim upper bounds for \code{k}, (ignored if \code{k} is supplied).
|
||||
#' @param tau Initial step-size.
|
||||
#' @param tol Tolerance for break condition.
|
||||
#' @param epochs maximum number of optimization steps.
|
||||
#' @param attempts number of arbitrary different starting points.
|
||||
#' @param logger a logger function (only for addvanced user).
|
||||
#' @param logger a logger function (only for advanced user, significantly slows down the computation).
|
||||
#' @rdname cve
|
||||
#' @export
|
||||
cve.call <- function(X, Y, method = "simple",
|
||||
|
@ -235,7 +234,7 @@ cve.call <- function(X, Y, method = "simple",
|
|||
return(dr)
|
||||
}
|
||||
|
||||
#' Loss distribution kink plot.
|
||||
#' Loss distribution elbow plot.
|
||||
#'
|
||||
#' @param x Object of class \code{"cve"} (result of [\code{\link{cve}}]).
|
||||
#' @param ... Pass through parameters to [\code{\link{plot}}] and
|
||||
|
@ -245,6 +244,7 @@ cve.call <- function(X, Y, method = "simple",
|
|||
#' as well as \code{\link{plot}}, the standard plot utility.
|
||||
#' @importFrom graphics plot lines points
|
||||
#' @method plot cve
|
||||
#' Boxplots of the loss from \code{min.dim} to \code{max.dim} \code{k} values.
|
||||
#' @export
|
||||
plot.cve <- function(x, ...) {
|
||||
L <- c()
|
||||
|
@ -256,7 +256,7 @@ plot.cve <- function(x, ...) {
|
|||
}
|
||||
}
|
||||
L <- matrix(L, ncol = length(k)) / var(x$Y)
|
||||
boxplot(L, main = "Kink plot",
|
||||
boxplot(L, main = "elbow plot",
|
||||
xlab = "SDR dimension",
|
||||
ylab = "Sample loss distribution",
|
||||
names = k)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#' Generates test datasets.
|
||||
#'
|
||||
#' Provides sample datasets. There are 5 different datasets named
|
||||
#' M1, M2, M3, M4 and M5 describet in the paper references below.
|
||||
#' M1, M2, M3, M4 and M5 described in the paper references below.
|
||||
#' The general model is given by:
|
||||
#' \deqn{Y ~ g(B'X) + \epsilon}
|
||||
#'
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#' Bandwidth estimation for CVE.
|
||||
#'
|
||||
#' Estimates a propper bandwidth \code{h} according
|
||||
#' Estimates a bandwidth \code{h} according
|
||||
#' \deqn{%
|
||||
#' h = \chi_{k}^{-1}\left(\frac{nObs - 1}{n-1}\right)\frac{2 tr(\Sigma)}{p}}{%
|
||||
#' h = qchisq( (nObs - 1)/(n - 1), k ) * (2 tr(\Sigma) / p)}
|
||||
#' with \eqn{n} the number of sample and \eqn{p} its dimension
|
||||
#' with \eqn{n} the sample size, \eqn{p} its dimension
|
||||
#' (\code{n <- nrow(X); p <- ncol(X)}) and the covariance-matrix \eqn{\Sigma}
|
||||
#' which is given by the standard maximum likelihood estimate.
|
||||
#' which is \code{(n-1)/n} times the sample covariance estimate.
|
||||
#'
|
||||
#' @param nObs Expected number of points in a slice, see paper.
|
||||
#' @param X data matrix with samples in its rows.
|
||||
#' @param k Dimension of lower dimensional projection.
|
||||
#' @param nObs number of points in a slice, see \eqn{nObs} in CVE paper.
|
||||
#'
|
||||
#' @seealso [\code{\link{qchisq}}]
|
||||
#' @export
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#' Samples uniform from the Stiefl Manifold.
|
||||
#' Draws a sample from the invariant measure on the Stiefel manifold \eqn{S(p, q)}.
|
||||
#'
|
||||
#' @param p row dim.
|
||||
#' @param q col dim.
|
||||
#' @return `(p, q)` semi-orthogonal matrix
|
||||
#' @param p row dimension
|
||||
#' @param q col dimension
|
||||
#' @return \code{p} times \code{q} semi-orthogonal matrix.
|
||||
#' @examples
|
||||
#' V <- rStiefel(6, 4)
|
||||
#' @export
|
||||
|
|
|
@ -20,7 +20,7 @@ supplied.}
|
|||
|
||||
\item{method}{specifies the CVE method variation as one of
|
||||
\itemize{
|
||||
\item "simple" exact implementation as describet in the paper listed
|
||||
\item "simple" exact implementation as described in the paper listed
|
||||
below.
|
||||
\item "weighted" variation with addaptive weighting of slices.
|
||||
}}
|
||||
|
|
|
@ -28,7 +28,7 @@ List with elements
|
|||
}
|
||||
\description{
|
||||
Provides sample datasets. There are 5 different datasets named
|
||||
M1, M2, M3, M4 and M5 describet in the paper references below.
|
||||
M1, M2, M3, M4 and M5 described in the paper references below.
|
||||
The general model is given by:
|
||||
\deqn{Y ~ g(B'X) + \epsilon}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
% Please edit documentation in R/CVE.R
|
||||
\name{plot.cve}
|
||||
\alias{plot.cve}
|
||||
\title{Creates a kink plot of the sample loss distribution over SDR dimensions.}
|
||||
\title{Loss distribution elbow plot.}
|
||||
\usage{
|
||||
\method{plot}{cve}(x, ...)
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
|||
[\code{\link{lines}}]}
|
||||
}
|
||||
\description{
|
||||
Creates a kink plot of the sample loss distribution over SDR dimensions.
|
||||
Loss distribution elbow plot.
|
||||
}
|
||||
\seealso{
|
||||
see \code{\link{par}} for graphical parameters to pass through
|
||||
|
|
|
@ -76,7 +76,7 @@ cve <- function(formula, data, method = "simple", max.dim = 10L, ...) {
|
|||
return(dr)
|
||||
}
|
||||
|
||||
#' @param nObs as describet in the Paper.
|
||||
#' @param nObs as described in the Paper.
|
||||
#' @param X Data
|
||||
#' @param Y Responces
|
||||
#' @param nObs Like in the paper.
|
||||
|
|
|
@ -142,7 +142,7 @@ cve_rcg <- function(X, Y, k,
|
|||
|
||||
# Reset beta if needed.
|
||||
if (loss.prime < 0) {
|
||||
# Compute `beta` as describet in paper.
|
||||
# Compute `beta` as described in paper.
|
||||
beta.FR <- (norm(A, type = 'F') / norm(A.last, type = 'F'))^2
|
||||
beta.PR <- sum(A * (A - A.last)) / norm(A.last, type = 'F')^2
|
||||
if (beta.PR < -beta.FR) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#' Generates test datasets.
|
||||
#'
|
||||
#' Provides sample datasets. There are 5 different datasets named
|
||||
#' M1, M2, M3, M4 and M5 describet in the paper references below.
|
||||
#' M1, M2, M3, M4 and M5 described in the paper references below.
|
||||
#' The general model is given by:
|
||||
#' \deqn{Y ~ g(B'X) + \epsilon}
|
||||
#'
|
||||
|
|
|
@ -30,7 +30,7 @@ See: \code{\link{formula}}.}
|
|||
|
||||
\item{Y}{Responces}
|
||||
|
||||
\item{nObs}{as describet in the Paper.}
|
||||
\item{nObs}{as described in the Paper.}
|
||||
|
||||
\item{k}{guess for SDR dimension.}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ List with elements
|
|||
}
|
||||
\description{
|
||||
Provides sample datasets. There are 5 different datasets named
|
||||
M1, M2, M3, M4 and M5 describet in the paper references below.
|
||||
M1, M2, M3, M4 and M5 described in the paper references below.
|
||||
The general model is given by:
|
||||
\deqn{Y ~ g(B'X) + \epsilon}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue