72 lines
2.0 KiB
R
72 lines
2.0 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{Implementation of the CVE method.}
|
||
\usage{
|
||
cve(formula, data, method = "simple", max.dim = 10, ...)
|
||
|
||
cve.call(X, Y, method = "simple", nObs = nrow(X)^0.5, min.dim = 1,
|
||
max.dim = 10, k, ...)
|
||
}
|
||
\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 described 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}}
|
||
}
|