predict_wrapper: wrapper function of three prediction methods

Description Usage Arguments Value Examples

View source: R/predict_wrapper.R

Description

wrapper function of three prediction methods

Usage

1
2
3
predict_wrapper(predictMethod = c("glmnet", "randomForest", "svm"),
  alphaValue, PhenoTrain_df, PhenoTest_df, respCol_index, outcome_type,
  seed_int, whichRep_int, whichCVfold_int, ncores)

Arguments

predictMethod

what prediction method to use

alphaValue

vector that storage alpha values

PhenoTrain_df

data frame that each row is a train samples

PhenoTest_df

data frame that each row is a test samples

respCol_index

response variable col number in beta data frame

outcome_type

type of outcome variable, gauusian or binomial or poisson, etc

seed_int

seed.value in use right row

whichRep_int

repetition num in use right now, this decides on the traning data to be used

whichCVfold_int

crossvalidation num in use right now, this decides on the traning data to be used

ncores

number of cores to do parallel computing

Value

a list contains train data frame and test data frame and number of predictors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
 data(ExampleMvalue_train)
 data(ExampleMvalue_test)

 predict_ls <- predict_wrapper(
   predictMethod = "glmnet",
   alphaValue = seq(0, 1, by = 0.1),
   PhenoTrain_df = ExampleMvalue_train,
   PhenoTest_df = ExampleMvalue_test,
   respCol_index = 1,
   outcome_type = "binomial",
   seed_int = 123,
   whichRep_int = 1,
   whichCVfold_int = 1,
   ncores = 2
   )
 
## End(Not run)

lizhongliu1996/PredictMisc documentation built on Aug. 23, 2019, 5:55 a.m.