2019-09-16 09:15:51 +00:00
|
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
|
% Please edit documentation in R/CVE.R
|
|
|
|
|
\name{cve}
|
|
|
|
|
\alias{cve}
|
|
|
|
|
\alias{cve.call}
|
|
|
|
|
\title{Implementation of the CVE method.}
|
|
|
|
|
\usage{
|
2019-09-25 12:49:12 +00:00
|
|
|
|
cve(formula, data, method = "simple", max.dim = 10L, ...)
|
2019-09-16 09:15:51 +00:00
|
|
|
|
|
2019-09-25 12:49:12 +00:00
|
|
|
|
cve.call(X, Y, method = "simple", nObs = sqrt(nrow(X)), h = NULL,
|
|
|
|
|
min.dim = 1L, max.dim = 10L, k = NULL, tau = 1, tol = 0.001,
|
|
|
|
|
epochs = 50L, attempts = 10L, logger = NULL)
|
2019-09-16 09:15:51 +00:00
|
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{formula}{Formel for the regression model defining `X`, `Y`.
|
|
|
|
|
See: \code{\link{formula}}.}
|
|
|
|
|
|
|
|
|
|
\item{data}{data.frame holding data for formula.}
|
|
|
|
|
|
|
|
|
|
\item{method}{The different only differe in the used optimization.
|
|
|
|
|
All of them are Gradient based optimization on a Stiefel manifold.
|
|
|
|
|
\itemize{
|
|
|
|
|
\item "simple" Simple reduction of stepsize.
|
|
|
|
|
\item "sgd" stocastic gradient decent.
|
|
|
|
|
\item TODO: further
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
\item{...}{Further parameters depending on the used method.}
|
|
|
|
|
|
|
|
|
|
\item{X}{Data}
|
|
|
|
|
|
|
|
|
|
\item{Y}{Responces}
|
|
|
|
|
|
|
|
|
|
\item{nObs}{as describet in the Paper.}
|
|
|
|
|
|
|
|
|
|
\item{k}{guess for SDR dimension.}
|
|
|
|
|
|
|
|
|
|
\item{nObs}{Like in the paper.}
|
|
|
|
|
|
|
|
|
|
\item{...}{Method specific parameters.}
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
Conditional Variance Estimator (CVE) is a novel sufficient dimension
|
|
|
|
|
reduction (SDR) method assuming a model
|
|
|
|
|
\deqn{Y \sim g(B'X) + \epsilon}{Y ~ g(B'X) + epsilon}
|
|
|
|
|
where B'X is a lower dimensional projection of the predictors.
|
|
|
|
|
}
|
|
|
|
|
\examples{
|
|
|
|
|
library(CVE)
|
|
|
|
|
|
|
|
|
|
# sample dataset
|
|
|
|
|
ds <- dataset("M5")
|
|
|
|
|
|
|
|
|
|
# call ´cve´ with default method (aka "simple")
|
|
|
|
|
dr.simple <- cve(ds$Y ~ ds$X, k = ncol(ds$B))
|
|
|
|
|
# plot optimization history (loss via iteration)
|
|
|
|
|
plot(dr.simple, main = "CVE M5 simple")
|
|
|
|
|
|
|
|
|
|
# call ´cve´ with method "linesearch" using ´data.frame´ as data.
|
|
|
|
|
data <- data.frame(Y = ds$Y, X = ds$X)
|
|
|
|
|
# Note: ´Y, X´ are NOT defined, they are extracted from ´data´.
|
|
|
|
|
dr.linesearch <- cve(Y ~ ., data, method = "linesearch", k = ncol(ds$B))
|
|
|
|
|
plot(dr.linesearch, main = "CVE M5 linesearch")
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
\references{
|
|
|
|
|
Fertl L., Bura E. Conditional Variance Estimation for Sufficient Dimension Reduction, 2019
|
|
|
|
|
}
|
|
|
|
|
\seealso{
|
|
|
|
|
\code{\link{formula}}. For a complete parameters list (dependent on
|
|
|
|
|
the method) see \code{\link{cve_simple}}, \code{\link{cve_sgd}}
|
|
|
|
|
}
|