pairCorrection: Paired feature correction

Description Usage Arguments Examples

View source: R/pairCorrection.R

Description

apply correction to paired features (need a better explanation here)

Usage

1
pairCorrection(data_object)

Arguments

data_object

argument is the output produced by as.MLinput function, which contains a single X data frame or a list of X data frames, a y data frames and attributes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#'dontrun{
library(peppuR)
library(missForest)
library(mice)

data('single_source')
data('multi_source')

x_multi = multi_source$X
y_multi = multi_source$Y

x_single = single_source$X
y_single = single_source$Y

sample_cname = 'ID'
outcome_cname = 'Group'
pair_cname = 'paircol'

result = as.MLinput(X = x_single, y = y_single, categorical_features = T , sample_cname = sample_cname, outcome_cname = outcome_cname, pair_cname = pair_cname)
result2 = as.MLinput(X = x_multi, y = y_multi, categorical_features = T, sample_cname = sample_cname, outcome_cname = outcome_cname, pair_cname = pair_cname)

imputed_res = impute_missing(result, method = 'randomforest')
imputed_res2 = impute_missing(result2, method = 'randomforest')

ufs_result = univariate_feature_selection(imputed_res)
ufs_result2 = univariate_feature_selection(imputed_res2)

apply_fs = applyFeatureSelection(imputed_res, ufs_result, pval_threshold = .05)
apply_fs2 = applyFeatureSelection(imputed_res2, ufs_result2, pval_threshold = c(.5,.1,.2,.3,.5))

final_result = correlationFiltering(data_object = apply_fs)
final_result2 = correlationFiltering(data_object = apply_fs2)

pc_result = pairCorrection(final_result)
pc_result2 = pairCorrection(final_result2)

}

pmartR/peppuR documentation built on Jan. 17, 2020, 12:54 p.m.