fs_line: Forward selection line plot

Description Usage Arguments Value Examples

View source: R/forward_selection_by_rank_class.R

Description

A line plot for forward selection. The computed model performance metric is plotted against the number of features included in the model.

Usage

1

Arguments

...

Additional slots and values passed to struct_class.

Value

A fs_line object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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_by_rank(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())

# chart
C = fs_line()
chart_plot(C,M)

structToolbox documentation built on Nov. 8, 2020, 6:54 p.m.