Learn R Programming

bigPLSR (version 0.7.2)

pls_threshold: Naive sparsity control by coefficient thresholding

Description

Naive sparsity control by coefficient thresholding

Usage

pls_threshold(object, threshold)

Value

A modified copy of object with thresholded coefficients.

Arguments

object

A fitted PLS model.

threshold

Values below this absolute magnitude are set to zero.

Examples

Run this code
set.seed(123)
X <- matrix(rnorm(40), nrow = 10)
y <- X[, 1] - 0.5 * X[, 2] + rnorm(10, sd = 0.1)
fit <- pls_fit(X, y, ncomp = 2)
pls_threshold(fit, threshold = 0.05)

Run the code above in your browser using DataLab