FSmethod | R Documentation |
This function performs feature selections via two approaches
filter.corr
- compute matrix correlation between features
and filter using a threshold.
rfeFS
- perform recursive feature elimination (RFE) method
wrapped with a Random Forest (RF) algorithm for feature importance
evaluation.
FSmethod(
x,
type = c("cor", "rfe", "both"),
cor.cutoff = 0.7,
resampling.method = "cv",
iter = 2,
repeats = 3,
metric = "Accuracy",
verbose = TRUE
)
x |
A data.frame containing protein-protein interactions, class labels and features. |
type |
The feature selection type, one or two of
|
cor.cutoff |
Correlation coefficient cutoff used for filtering.
See |
resampling.method |
The resampling method for RFE :'boot',
'boot632', optimism_boot',boot_all', 'cv', 'repeatedcv', 'LOOCV',
'LGOCV';defaults to cv. See |
iter |
Number of partitions for cross-validation;
defaults to 2. See |
repeats |
For repeated k-fold cross validation only;
defaults to 3.See |
metric |
A string that specifies what summary metric will be used
to select the optimal feature ; default to ROC.See |
verbose |
Make the output verbose.See |
FSmethod
If the type set to filter.corr
, the output includes
the following elements:
corProfile - A correlation matrix.
corSelectedFeatures - Name of features that retained after the correlation analysis.
cordf - A data.frame filtered.
If the type set to rfeFS
, the output includes the following
elements:
rfProfile - A list of elements. See rfe
for
more details.
rfSelectedFeatures - Name of features that retained in the feature selection process.
rfdf - A data.frame filtered.
If type set to both
the output includes the following elements:
rfdf - The final data.frame that includes the selected features
retained after both filter.corr
and rfeFS
analysis.
Matineh Rahmatbakhsh, matinerb.94@gmail.com.
data('example_data')
x <- na.omit(example_data)
s <- FSmethod(x, type = 'both',
cor.cutoff = 0.7, resampling.method = "repeatedcv",
iter = 5, repeats = 3, metric = "ROC", verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.