| .fit.relief | R Documentation |
tidyfitSelects features for continuous or factor data using ReliefF on a 'tidyFit' R6 class. The function can be used with regress and classify.
## S3 method for class 'relief'
.fit(self, data = NULL)
self |
a 'tidyFit' R6 class. |
data |
a data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
Hyperparameters:
None. Cross validation not applicable.
Important method arguments (passed to m)
estimator (selection algorithm to use (default is 'ReliefFequalK'))
The ReliefF algorithm is estimated using the CORElearn::attrEval function. See ?attrEval for more details.
Implementation
Use with regress for regression problems and with classify for classification problems. coef returns the score for each feature. Select the required number of features with the largest scores.
The Relief objects have no predict and related methods.
A fitted 'tidyFit' class model.
Johann Pfitzinger
Robnik-Sikonja M, Savicky P (2021). CORElearn: Classification, Regression and Feature Evaluation. R package version 1.56.0, https://CRAN.R-project.org/package=CORElearn.
.fit.mrmr and m methods
# Load data
data <- tidyfit::Factor_Industry_Returns
data <- dplyr::filter(data, Industry == "HiTec")
data <- dplyr::select(data, -Date, -Industry)
# Stand-alone function
fit <- m("relief", Return ~ ., data)
coef(fit)
# Within 'regress' function
fit <- regress(data, Return ~ ., m("relief"))
coef(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.