forward_selection_byrank {structToolbox} | R Documentation |
Forward selection by rank is a stepwise procedures that includes features incrementally based on their rank. Any measure for ranking the features may be used e.g. PLS VIP score, ttest p-value etc.
forward_selection_byrank( min_no_vars = 1, max_no_vars = 100, step_size = 1, factor_name, variable_rank, ... )
min_no_vars |
minimum number of features to test |
max_no_vars |
maximum numbe ro features to test |
step_size |
the size of the incremenent between min and max no of vars |
factor_name |
the sample-meta colum to use |
variable_rank |
a vector of values that can be used to rank the features, where the smallest value is the first rank. |
... |
additional slots and values passed to struct_class |
A struct object
# some data D = MTBLS79_DatasetExperiment(filtered=TRUE) # normalise, impute and scale then remove QCs P = pqn_norm(qc_label='QC',factor_name='class') + knn_impute(neighbours=5) + glog_transform(qc_label='QC',factor_name='class') + filter_smeta(mode='exclude',levels='QC',factor_name='class') P = model_apply(P,D) D = predicted(P) # forward selection using a PLSDA model M = forward_selection_byrank(factor_name='class', min_no_vars=2, max_no_vars=11, variable_rank=1:2063) * (mean_centre() + PLSDA(number_components=1, factor_name='class')) M = run(M,D,balanced_accuracy())