Skip to contents

Print enpls.fs object.

Usage

# S3 method for 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.3709543
#> MEDV.23   2.0805190
#> MEDV.33   2.0263261
#> Chi.P.4   1.9926551
#> Chi.P.5   1.5626623
#> Estate.1  1.4482609
#> MEDV.13   1.3793226
#> MEDV.22   1.2299934
#> Chi.P.3   1.1104510
#> MEDV.12   1.0635508
#> MEDV.11   0.9492159
#> Estate.2  0.8926518
#> Chi.P.2   0.8470757
#> Chi.PC.4  0.7459319
#> Kappa.1   0.7190082
#> Kappa.3   0.7063439
#> Chi.P.1   0.4901006
#> Kappa.2   0.4518056
#> Kappa.4   0.3671246
#> Chi.P.0   0.3355310
#> Estate.3  0.2590686
print(fs, nvar = 10L)
#> Variable Importance by Ensemble Partial Least Squares
#> ---
#>          Importance
#> Chi.C.3    2.370954
#> MEDV.23    2.080519
#> MEDV.33    2.026326
#> Chi.P.4    1.992655
#> Chi.P.5    1.562662
#> Estate.1   1.448261
#> MEDV.13    1.379323
#> MEDV.22    1.229993
#> Chi.P.3    1.110451
#> MEDV.12    1.063551