Learn R Programming

nda (version 0.3.0)

fs.dimred: Loading-Based Feature Selection

Description

Selects indicators from NDA, PCA, factor-analysis, and other objects that expose loadings, rotations, or variable coordinates. When the original model call is available, the model is refitted after every removal so that all later decisions use the current communalities and loadings.

Usage

fs.dimred(fn, DF, min_comm = 0.25, com_comm = 0.25, ...)

Value

The final refitted model, preserving its original class, with dropped_low, dropped_com, and retained_DF (also available as remain_DF) added. The original fitted model is available as model.

Arguments

fn

Fitted dimensionality-reduction object. Supported structures include nda, prcomp, princomp, psych PCA/FA, and objects with loadings, rotation, or var$coord.

DF

Original numeric data or a symmetric correlation matrix.

min_comm

Minimum indicator communality.

com_comm

Minimum separation between the two largest absolute loadings. An indicator is treated as common only when its largest loading is both less than twice and less than com_comm above its second-largest loading.

...

Reserved for future model-specific extraction.

Examples

Run this code
pca <- prcomp(swiss, scale. = TRUE)
selected <- fs.dimred(pca, swiss)
colnames(selected$retained_DF)

Run the code above in your browser using DataLab