fitEnsembleModel: fitEnsembleModel

View source: R/ModelSeries_fitModels2.R

fitEnsembleModelR Documentation

fitEnsembleModel

Description

Train multiple subtype models using cross validation

Usage

fitEnsembleModel(
  Xs,
  Ys,
  geneSet = NULL,
  na.fill.method = c("quantile", "rpart", NULL)[1],
  na.fill.seed = 2022,
  n = 20,
  sampSize = 0.7,
  sampSeed = 2020,
  breakVec = c(0, 0.25, 0.5, 0.75, 1),
  params = list(device = "cpu", nrounds = 15, max_depth = 10, eta = 0.5, nthread = 5,
    colsample_bytree = 1, min_child_weight = 1),
  nround.mode = c("fixed", "polling")[2],
  xgboost.seed = 105,
  caret.grid = expand.grid(nrounds = c(10, 15), max_depth = c(5, 10), eta = c(0.01, 0.1,
    0.3), gamma = c(0.5, 0.3), colsample_bytree = 1, min_child_weight = 1, subsample =
    0.7),
  caret.seed = 101,
  ptail = 0.5,
  verbose = F,
  numCores = 2
)

Arguments

Xs

Gene expression matrix.

Ys

Phenotype vector, multiclass

geneSet

A list of genes for classification

na.fill.method

Missing value imputation method for na_fill function. One of 'quantile', 'rpart' and NULL.

na.fill.seed

Seed for na_fill function.

n

Size of the ensember, where each member is a result from fitSubtypeModel

sampSize

proportion of samples to hold back

sampSeed

random seed for subset of Xs

breakVec

vector of break points, used to bin expression data

params

The parameters for xgb.train. 1. xgb.cv only: nfold; 2. xgboost: nrounds, max_depth, eta, nthread, colsample_bytree, min_child_weight.

nround.mode

One of fixed and polling. fixed mode is recommended!

  • polling Default but legacy feature, which means to call the best_iteration via xgb.cv

  • fixed Use the default nrounds in params, so it's faster(10-20 folds) than polling.

xgboost.seed

Seed for xgboost.

caret.seed

The random seed for caret::train process when params is NULL

ptail

Binary phenotype vector.

verbose

whether report modeling process

Details

The geneid of geneSet and Xs must be the same (one of ENSEMBL, SYMBOL or ENTREZID). In addition, if fitEnsembleModel is hanged on, please check the space use of /, which would disturb the work of makeCluster.

Value

A list of lists of xgboost classifiers


huangwb8/GSClassifier documentation built on July 12, 2024, 5:10 p.m.