tidyfit
R/fit.mrmr.R
dot-fit.mrmr.Rd
Selects features for continuous or (ordered) factor data using MRMR on a 'tidyFit' R6
class. The function can be used with regress
and classify
.
# S3 method for class 'mrmr'
.fit(self, data = NULL)
A fitted 'tidyFit' class model.
Hyperparameters:
None. Cross validation not applicable.
Important method arguments (passed to m
)
feature_count (number of features to select)
solution_count (ensemble size)
The MRMR algorithm is estimated using the mRMRe::mRMR.ensemble
function. See ?mRMR.ensemble
for more details.
Implementation
Use with regress
for regression problems and with classify
for classification problems. The selected features can be obtained using coef
.
The MRMR objects have no predict
and related methods.
De Jay N, Papillon-Cavanagh S, Olsen C, Bontempi G and Haibe-Kains B (2012). mRMRe: an R package for parallelized mRMR ensemble feature selection.
m
methods
# Load data
data <- tidyfit::Factor_Industry_Returns
data <- dplyr::filter(data, Industry == "HiTec")
data <- dplyr::select(data, SMB, HML, RMW, CMA, Return)
if (FALSE) { # \dontrun{
fit <- m("mrmr", Return ~ ., data, feature_count = 2)
# Retrieve selected features
coef(fit)
} # }