Skip to contents

Print enpls.fs object.

Usage

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

Arguments

x

An object of class enpls.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 enpls.fs for measuring feature importance with ensemble partial least squares regressions.

Author

Nan Xiao <https://nanx.me>

Examples

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

set.seed(42)
fs <- enpls.fs(x, y, reptimes = 100)
print(fs)
#> Variable Importance by Ensemble Partial Least Squares
#> ---
#>          Importance
#> Chi.C.3   2.4893750
#> MEDV.23   2.1020096
#> MEDV.33   2.0385631
#> Chi.P.4   2.0380899
#> Chi.P.5   1.5874477
#> Estate.1  1.4055916
#> MEDV.13   1.4055718
#> MEDV.22   1.2215816
#> Chi.P.3   1.1170859
#> MEDV.12   1.0652457
#> MEDV.11   0.9543018
#> Chi.P.2   0.8644542
#> Estate.2  0.8576835
#> Chi.PC.4  0.7431531
#> Kappa.1   0.7276681
#> Kappa.3   0.7165651
#> Chi.P.1   0.5003089
#> Kappa.2   0.4640071
#> Kappa.4   0.3839143
#> Chi.P.0   0.3616612
#> Estate.3  0.2329668
print(fs, nvar = 10L)
#> Variable Importance by Ensemble Partial Least Squares
#> ---
#>          Importance
#> Chi.C.3    2.489375
#> MEDV.23    2.102010
#> MEDV.33    2.038563
#> Chi.P.4    2.038090
#> Chi.P.5    1.587448
#> Estate.1   1.405592
#> MEDV.13    1.405572
#> MEDV.22    1.221582
#> Chi.P.3    1.117086
#> MEDV.12    1.065246