110 lines
3.4 KiB
R
110 lines
3.4 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/CVE.R
|
|
\name{cve}
|
|
\alias{cve}
|
|
\alias{cve.call}
|
|
\title{Conditional Variance Estimator (CVE).}
|
|
\usage{
|
|
cve(formula, data, method = "simple", max.dim = 10L, ...)
|
|
|
|
cve.call(X, Y, method = "simple", nObs = sqrt(nrow(X)), h = NULL,
|
|
min.dim = 1L, max.dim = 10L, k = NULL, momentum = 0, tau = 1,
|
|
tol = 0.001, slack = 0, gamma = 0.5, V.init = NULL,
|
|
max.iter = 50L, attempts = 10L, logger = NULL)
|
|
}
|
|
\arguments{
|
|
\item{formula}{an object of class \code{"formula"} which is a symbolic
|
|
description of the model to be fitted.}
|
|
|
|
\item{data}{an optional data frame, containing the data for the formula if
|
|
supplied.}
|
|
|
|
\item{method}{specifies the CVE method variation as one of
|
|
\itemize{
|
|
\item "simple" exact implementation as described in the paper listed
|
|
below.
|
|
\item "weighted" variation with addaptive weighting of slices.
|
|
}}
|
|
|
|
\item{max.dim}{upper bounds for \code{k}, (ignored if \code{k} is supplied).}
|
|
|
|
\item{...}{Parameters passed on to \code{cve.call}.}
|
|
|
|
\item{X}{data matrix with samples in its rows.}
|
|
|
|
\item{Y}{Responses (1 dimensional).}
|
|
|
|
\item{nObs}{parameter for choosing bandwidth \code{h} using
|
|
\code{\link{estimate.bandwidth}} (ignored if \code{h} is supplied).}
|
|
|
|
\item{h}{bandwidth or function to estimate bandwidth, defaults to internaly
|
|
estimated bandwidth.}
|
|
|
|
\item{min.dim}{lower bounds for \code{k}, (ignored if \code{k} is supplied).}
|
|
|
|
\item{k}{Dimension of lower dimensional projection, if \code{k} is given
|
|
only the specified dimension \code{B} matrix is estimated.}
|
|
|
|
\item{momentum}{number of [0, 1) giving the ration of momentum for eucledian
|
|
gradient update with a momentum term.}
|
|
|
|
\item{tau}{Initial step-size.}
|
|
|
|
\item{tol}{Tolerance for break condition.}
|
|
|
|
\item{slack}{Positive scaling to allow small increases of the loss while
|
|
optimizing.}
|
|
|
|
\item{gamma}{step-size reduction multiple.}
|
|
|
|
\item{V.init}{Semi-orthogonal matrix of dimensions `(ncol(X), ncol(X) - k)` #' as optimization starting value. (If supplied, \code{attempts} is
|
|
set to 1 and \code{k} to match dimension)}
|
|
|
|
\item{max.iter}{maximum number of optimization steps.}
|
|
|
|
\item{attempts}{number of arbitrary different starting points.}
|
|
|
|
\item{logger}{a logger function (only for advanced user, significantly slows
|
|
down the computation).}
|
|
}
|
|
\value{
|
|
dr is a S3 object of class \code{cve} with named properties:
|
|
\itemize{
|
|
\item X: Original training data,
|
|
\item Y: Responce of original training data,
|
|
\item method: Name of used method,
|
|
\item call: The method call
|
|
}
|
|
as well as indexed entries \code{dr$res[[k]]} storing the k-dimensional SDR
|
|
projection matrices.
|
|
|
|
dr is a list which contains:
|
|
\itemize{
|
|
\item dir: dir[[d]] is the central space with d-dimension
|
|
d = 1, 2, ..., p reduced direction of different dimensions
|
|
\item y: the value of response
|
|
\item idx: the index of variables which survives after screening
|
|
\item max.dim: the largest dimensions of CS or CMS which have been calculated in mave function
|
|
\item ky: parameter used for DIM for selection
|
|
\item x: the original training data
|
|
}
|
|
}
|
|
\description{
|
|
TODO: reuse of package description and details!!!!
|
|
}
|
|
\examples{
|
|
# create dataset
|
|
x <- matrix(rnorm(400), 100, 4)
|
|
y <- x[, 1] + x[, 2] + as.matrix(rnorm(100))
|
|
|
|
# Call CVE using momentum.
|
|
dr.momentum <- cve(y ~ x, momentum = 0.2)
|
|
# Call weighted CVE.
|
|
dr.weighted <- cve(y ~ x, method = "weighted")
|
|
|
|
}
|
|
\seealso{
|
|
For a detailed description of \code{formula} see
|
|
\code{\link{formula}}.
|
|
}
|