Package 'SEPaLS'

Title: Shrinkage for Extreme Partial Least-Squares (SEPaLS)
Description: Regression context for the Partial Least Squares framework for Extreme values. Estimations of the Shrinkage for Extreme Partial Least-Squares (SEPaLS) estimators, an adaptation of the original Partial Least Squares (PLS) method tailored to the extreme-value framework. The SEPaLS project is a joint work by Stephane Girard, Hadrien Lorenzo and Julyan Arbel. R code to replicate the results of the paper is available at <https://github.com/hlorenzo/SEPaLS_simus>. Extremes within PLS was already studied by one of the authors, see M Bousebeta, G Enjolras, S Girard (2023) <doi:10.1016/j.jmva.2022.105101>.
Authors: Stephane Girard [aut], Julyan Arbel [aut], Hadrien Lorenzo [aut, cre, cph]
Maintainer: Hadrien Lorenzo <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2025-02-17 04:44:34 UTC
Source: https://github.com/hlorenzo/sepals

Help Index


Bootstrap function for SEPaLS estimator.

Description

Bootstrap function for SEPaLS estimator.

Usage

bootstrap.SEPaLS(
  X,
  Y,
  yn,
  type = c("vMF", "Laplace"),
  mu0 = NULL,
  kappa0 = NULL,
  lambda = NULL,
  B = 20
)

Arguments

X

(n×p)(n\times p)-dimensional matrix of the covariates.

Y

(n)(n)-dimensional vector of the response.

yn

yny_n the quantile corresponding to lowest values of YYs to put in the tail.

type

character, whether vMF for von Mises-Fisher prior or Laplace for Laplace prior. See details.

mu0

μ0\mu_0, unitary (p)(p)-dimensional vector. The direction parameter for the vMF prior.

kappa0

κ0\kappa_0, positive. The concentration parameter for the vMF prior.

lambda

λ\lambda, positive. The concentration parameter for the Laplace prior.

B

positive integer. The number of bootstrap samples on which estimate the SEPaLS directions. Default to 20.

Value

A list with two elements:

  • ws: A (B×p)(B\times p)-dimensional matrix with each row corresponding to the SEPaLS direction estimated on each bootstrap sample.

  • cor: The correlation of each estimate direction on the Out-Of-Bag (OOB) sample with the response.

See Also

SEPaLS

Examples

set.seed(5)
n <- 3000
p <- 10
X <- matrix(rnorm(n*p),n,p)
beta <- c(5:1,rep(0,p-5)) ; beta <- beta/sqrt(sum(beta^2))
Y <- (X%*%beta)^3 + rnorm(n)
boot.sepals_Laplace <- bootstrap.SEPaLS(X,Y,yn=1,type="Laplace",lambda=0.01,
B=100)
boxplot(boot.sepals_Laplace$ws);abline(h=0,col="red",lty=2)

Maximum Likelihood estimator

Description

Maximum Likelihood estimator

Usage

maximum_Likelihood_SEPaLS(X, Y, yn)

Arguments

X

(n×p)(n\times p)-dimensional matrix of the covariates.

Y

(n)(n)-dimensional vector of the response.

yn

the quantile corresponding to the lowest values of YYs to put in the tail.

Value

The maximum likelihood estimator.

Examples

n <- 3000
p <- 10
X <- matrix(rnorm(n*p),n,p)
beta <- c(5:1,rep(0,p-5)) ; beta <- beta/sqrt(sum(beta^2))
Y <- X%*%beta + rnorm(n,sd=1/3)
estimators <- do.call(rbind,lapply(seq(0,1,length.out=100),function(pp){
  yn <- quantile(Y,probs = pp)
  maximum_Likelihood_SEPaLS(X,Y,yn)
}))
matplot(estimators,type="l",lty=1,col=c(rep(2,5),rep(1,p-5)))
abline(h=beta/sqrt(sum(beta^2)),col=c(rep(2,5),rep(1,p-5)))

The RICA dataset describing the production of carrots (open field) (in quintals) from 2000 to 2015.

Description

A subset of data from the 'agreste' French governmental website <https://agreste.agriculture.gouv.fr/agreste-web/servicon/I.2/listeTypeServicon/>.

Usage

data(ricaCarrots)

Format

'ricaCarrots'

A List of 3 objects:

Y

a vector. The production of carrots (open field) (in quintals) for 598 French farms.

X

a matrix. The 259 covariates describing the same 598 French farms.

description

a matrix. Description of the 259 covariates.

Source

<https://agreste.agriculture.gouv.fr/agreste-web/servicon/I.2/listeTypeServicon/>


Function to estimate SEPaLS estimators

Description

Function to estimate SEPaLS estimators

Usage

SEPaLS(
  X,
  Y,
  yn,
  type = c("vMF", "Laplace"),
  mu0 = NULL,
  kappa0 = NULL,
  lambda = NULL
)

Arguments

X

(n×p)(n\times p)-dimensional matrix of the covariates.

Y

(n)(n)-dimensional vector of the response.

yn

yny_n the quantile correponding to lowest values of YYs to put in th e tail.

type

character, wether vMF for von Mises-Fisher prior or Laplace for Laplace prior. See details.

mu0

μ0\mu_0, unitary (p)(p)-dimensional vector. The direction parameter for the vMF prior.

kappa0

κ0\kappa_0, positive. The concentration parameter for the vMF prior.

lambda

λ\lambda, positive. The concentration parameter for the Laplace prior.

Details

The SEPaLS estimators are built depending on the value given to type:

  • vMF: then the estimator is proportional to

    β^ml(yn)+κ0μ0,\hat{\beta}_{ml}(y_n) + \kappa_0\mu_0,

    where β^ml(yn)\hat{\beta}_{ml}(y_n) is the EPLS estimator, which coincides with the maximum-likelihood estimator of SEPaLS for a threshold yny_n.

  • Laplace: then the estimator is proportional to

    Sλ(β^ml(yn)),S_\lambda\left(\hat{\beta}_{ml}(y_n)\right),

    where SλS_\lambda is the soft-thresholding operator of threshold λ\lambda.

Value

A SEPaLS estimator

See Also

bootstrap.SEPaLS

Examples

set.seed(1)
n <- 3000
p <- 10
X <- matrix(rnorm(n*p),n,p)
beta <- c(5:1,rep(0,p-5)) ; beta <- beta/sqrt(sum(beta^2))
Y <- (X%*%beta)^3 + rnorm(n,sd=1/3)
mu0 <- rnorm(p) ; mu0 <- mu0/sqrt(sum(mu0^2))
sepals_vMF <- SEPaLS(X,Y,yn=1,type="vMF",mu0=mu0,kappa0=1)
sepals_Laplace <- SEPaLS(X,Y,yn=1,type="Laplace",lambda=0.01)