Skip to contents

Print enspls.fs object.

Usage

# S3 method for enspls.fs
print(x, sort = TRUE, nvar = NULL, ...)

Arguments

x

An object of class enspls.fs.

sort

Should the variables be sorted in decreasing order of importance?

nvar

Number of top variables to show. Ignored if sort = FALSE.

...

Additional parameters for print.

See also

See enspls.fs for measuring feature importance with ensemble sparse partial least squares regressions.

Author

Nan Xiao <https://nanx.me>

Examples

data("logd1k")
x <- logd1k$x
y <- logd1k$y

set.seed(42)
fs <- enspls.fs(
  x, y,
  reptimes = 5, maxcomp = 3,
  alpha = c(0.3, 0.6, 0.9)
)
print(fs, nvar = 10L)
#> Variable Importance by Ensemble Sparse Partial Least Squares
#> ---
#>                     Importance
#> SlogP_VSA2            70.23155
#> Chi0n                 43.24274
#> Chi1n                 42.86634
#> LabuteASA             42.44808
#> Chi1                  37.99326
#> HeavyAtomCount        36.06243
#> EState_VSA7           34.00841
#> NumValenceElectrons   32.67029
#> MolMR                 31.76546
#> Chi0v                 30.18469