Package 'FREEtree'

Title: Tree Method for High Dimensional Longitudinal Data
Description: A tree-based method for high dimensional longitudinal data with correlated features. 'FREEtree' deals with longitudinal data by using a piecewise random effect model. It also exploits the network structure of the features, by first clustering them using Weighted Gene Co-expression Network Analysis ('WGCNA'). It then conducts a screening step within each cluster of features and a selecting step among the surviving features, which provides a relatively unbiased way to do feature selection. By using dominant principle components as regression variables at each leaf and the original features as splitting variables at splitting nodes, 'FREEtree' maintains 'interpretability' and improves computational efficiency.
Authors: Yuancheng Xu [aut], Athanasse Zafirov [cre], Christina Ramirez [aut], Dan Kojis [aut], Min Tan [aut], Mike Alvarez [aut]
Maintainer: Athanasse Zafirov <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-25 04:25:53 UTC
Source: https://github.com/adzafirov/freetree

Help Index


A dataset containing simulated feature long and wide data. The last six columns contain outcome variable, patient ID, treatment, time and time squared features.

Description

A dataset containing simulated feature long and wide data. The last six columns contain outcome variable, patient ID, treatment, time and time squared features.

Usage

data

Format

A data frame with 100 rows and 406 variables:

rand_int

control variable (not used)

time

time trend variable (1 to 6)

time2

squared time trend variable

treatment

binary treatment feature

patient

patient ID for 20 patients

y

outcome variable

V1

simulated feature correlated to varrying degrees

V2

simulated feature correlated to varrying degrees

V3

simulated feature correlated to varrying degrees

V4

simulated feature correlated to varrying degrees

V5

simulated feature correlated to varrying degrees

V6

simulated feature correlated to varrying degrees

V7

simulated feature correlated to varrying degrees

V8

simulated feature correlated to varrying degrees

V9

simulated feature correlated to varrying degrees

V10

simulated feature correlated to varrying degrees

V11

simulated feature correlated to varrying degrees

V12

simulated feature correlated to varrying degrees

V13

simulated feature correlated to varrying degrees

V14

simulated feature correlated to varrying degrees

V15

simulated feature correlated to varrying degrees

V16

simulated feature correlated to varrying degrees

V17

simulated feature correlated to varrying degrees

V18

simulated feature correlated to varrying degrees

V19

simulated feature correlated to varrying degrees

V20

simulated feature correlated to varrying degrees

V21

simulated feature correlated to varrying degrees

V22

simulated feature correlated to varrying degrees

V23

simulated feature correlated to varrying degrees

V24

simulated feature correlated to varrying degrees

V25

simulated feature correlated to varrying degrees

V26

simulated feature correlated to varrying degrees

V27

simulated feature correlated to varrying degrees

V28

simulated feature correlated to varrying degrees

V29

simulated feature correlated to varrying degrees

V30

simulated feature correlated to varrying degrees

V31

simulated feature correlated to varrying degrees

V32

simulated feature correlated to varrying degrees

V33

simulated feature correlated to varrying degrees

V34

simulated feature correlated to varrying degrees

V35

simulated feature correlated to varrying degrees

V36

simulated feature correlated to varrying degrees

V37

simulated feature correlated to varrying degrees

V38

simulated feature correlated to varrying degrees

V39

simulated feature correlated to varrying degrees

V40

simulated feature correlated to varrying degrees

V41

simulated feature correlated to varrying degrees

V42

simulated feature correlated to varrying degrees

V43

simulated feature correlated to varrying degrees

V44

simulated feature correlated to varrying degrees

V45

simulated feature correlated to varrying degrees

V46

simulated feature correlated to varrying degrees

V47

simulated feature correlated to varrying degrees

V48

simulated feature correlated to varrying degrees

V49

simulated feature correlated to varrying degrees

V50

simulated feature correlated to varrying degrees

V51

simulated feature correlated to varrying degrees

V52

simulated feature correlated to varrying degrees

V53

simulated feature correlated to varrying degrees

V54

simulated feature correlated to varrying degrees

V55

simulated feature correlated to varrying degrees

V56

simulated feature correlated to varrying degrees

V57

simulated feature correlated to varrying degrees

V58

simulated feature correlated to varrying degrees

V59

simulated feature correlated to varrying degrees

V60

simulated feature correlated to varrying degrees

V61

simulated feature correlated to varrying degrees

V62

simulated feature correlated to varrying degrees

V63

simulated feature correlated to varrying degrees

V64

simulated feature correlated to varrying degrees

V65

simulated feature correlated to varrying degrees

V66

simulated feature correlated to varrying degrees

V67

simulated feature correlated to varrying degrees

V68

simulated feature correlated to varrying degrees

V69

simulated feature correlated to varrying degrees

V70

simulated feature correlated to varrying degrees

V71

simulated feature correlated to varrying degrees

V72

simulated feature correlated to varrying degrees

V73

simulated feature correlated to varrying degrees

V74

simulated feature correlated to varrying degrees

V75

simulated feature correlated to varrying degrees

V76

simulated feature correlated to varrying degrees

V77

simulated feature correlated to varrying degrees

V78

simulated feature correlated to varrying degrees

V79

simulated feature correlated to varrying degrees

V80

simulated feature correlated to varrying degrees

V81

simulated feature correlated to varrying degrees

V82

simulated feature correlated to varrying degrees

V83

simulated feature correlated to varrying degrees

V84

simulated feature correlated to varrying degrees

V85

simulated feature correlated to varrying degrees

V86

simulated feature correlated to varrying degrees

V87

simulated feature correlated to varrying degrees

V88

simulated feature correlated to varrying degrees

V89

simulated feature correlated to varrying degrees

V90

simulated feature correlated to varrying degrees

V91

simulated feature correlated to varrying degrees

V92

simulated feature correlated to varrying degrees

V93

simulated feature correlated to varrying degrees

V94

simulated feature correlated to varrying degrees

V95

simulated feature correlated to varrying degrees

V96

simulated feature correlated to varrying degrees

V97

simulated feature correlated to varrying degrees

V98

simulated feature correlated to varrying degrees

V99

simulated feature correlated to varrying degrees

V100

simulated feature correlated to varrying degrees

V101

simulated feature correlated to varrying degrees

V102

simulated feature correlated to varrying degrees

V103

simulated feature correlated to varrying degrees

V104

simulated feature correlated to varrying degrees

V105

simulated feature correlated to varrying degrees

V106

simulated feature correlated to varrying degrees

V107

simulated feature correlated to varrying degrees

V108

simulated feature correlated to varrying degrees

V109

simulated feature correlated to varrying degrees

V110

simulated feature correlated to varrying degrees

V111

simulated feature correlated to varrying degrees

V112

simulated feature correlated to varrying degrees

V113

simulated feature correlated to varrying degrees

V114

simulated feature correlated to varrying degrees

V115

simulated feature correlated to varrying degrees

V116

simulated feature correlated to varrying degrees

V117

simulated feature correlated to varrying degrees

V118

simulated feature correlated to varrying degrees

V119

simulated feature correlated to varrying degrees

V120

simulated feature correlated to varrying degrees

V121

simulated feature correlated to varrying degrees

V122

simulated feature correlated to varrying degrees

V123

simulated feature correlated to varrying degrees

V124

simulated feature correlated to varrying degrees

V125

simulated feature correlated to varrying degrees

V126

simulated feature correlated to varrying degrees

V127

simulated feature correlated to varrying degrees

V128

simulated feature correlated to varrying degrees

V129

simulated feature correlated to varrying degrees

V130

simulated feature correlated to varrying degrees

V131

simulated feature correlated to varrying degrees

V132

simulated feature correlated to varrying degrees

V133

simulated feature correlated to varrying degrees

V134

simulated feature correlated to varrying degrees

V135

simulated feature correlated to varrying degrees

V136

simulated feature correlated to varrying degrees

V137

simulated feature correlated to varrying degrees

V138

simulated feature correlated to varrying degrees

V139

simulated feature correlated to varrying degrees

V140

simulated feature correlated to varrying degrees

V141

simulated feature correlated to varrying degrees

V142

simulated feature correlated to varrying degrees

V143

simulated feature correlated to varrying degrees

V144

simulated feature correlated to varrying degrees

V145

simulated feature correlated to varrying degrees

V146

simulated feature correlated to varrying degrees

V147

simulated feature correlated to varrying degrees

V148

simulated feature correlated to varrying degrees

V149

simulated feature correlated to varrying degrees

V150

simulated feature correlated to varrying degrees

V151

simulated feature correlated to varrying degrees

V152

simulated feature correlated to varrying degrees

V153

simulated feature correlated to varrying degrees

V154

simulated feature correlated to varrying degrees

V155

simulated feature correlated to varrying degrees

V156

simulated feature correlated to varrying degrees

V157

simulated feature correlated to varrying degrees

V158

simulated feature correlated to varrying degrees

V159

simulated feature correlated to varrying degrees

V160

simulated feature correlated to varrying degrees

V161

simulated feature correlated to varrying degrees

V162

simulated feature correlated to varrying degrees

V163

simulated feature correlated to varrying degrees

V164

simulated feature correlated to varrying degrees

V165

simulated feature correlated to varrying degrees

V166

simulated feature correlated to varrying degrees

V167

simulated feature correlated to varrying degrees

V168

simulated feature correlated to varrying degrees

V169

simulated feature correlated to varrying degrees

V170

simulated feature correlated to varrying degrees

V171

simulated feature correlated to varrying degrees

V172

simulated feature correlated to varrying degrees

V173

simulated feature correlated to varrying degrees

V174

simulated feature correlated to varrying degrees

V175

simulated feature correlated to varrying degrees

V176

simulated feature correlated to varrying degrees

V177

simulated feature correlated to varrying degrees

V178

simulated feature correlated to varrying degrees

V179

simulated feature correlated to varrying degrees

V180

simulated feature correlated to varrying degrees

V181

simulated feature correlated to varrying degrees

V182

simulated feature correlated to varrying degrees

V183

simulated feature correlated to varrying degrees

V184

simulated feature correlated to varrying degrees

V185

simulated feature correlated to varrying degrees

V186

simulated feature correlated to varrying degrees

V187

simulated feature correlated to varrying degrees

V188

simulated feature correlated to varrying degrees

V189

simulated feature correlated to varrying degrees

V190

simulated feature correlated to varrying degrees

V191

simulated feature correlated to varrying degrees

V192

simulated feature correlated to varrying degrees

V193

simulated feature correlated to varrying degrees

V194

simulated feature correlated to varrying degrees

V195

simulated feature correlated to varrying degrees

V196

simulated feature correlated to varrying degrees

V197

simulated feature correlated to varrying degrees

V198

simulated feature correlated to varrying degrees

V199

simulated feature correlated to varrying degrees

V200

simulated feature correlated to varrying degrees

V201

simulated feature correlated to varrying degrees

V202

simulated feature correlated to varrying degrees

V203

simulated feature correlated to varrying degrees

V204

simulated feature correlated to varrying degrees

V205

simulated feature correlated to varrying degrees

V206

simulated feature correlated to varrying degrees

V207

simulated feature correlated to varrying degrees

V208

simulated feature correlated to varrying degrees

V209

simulated feature correlated to varrying degrees

V210

simulated feature correlated to varrying degrees

V211

simulated feature correlated to varrying degrees

V212

simulated feature correlated to varrying degrees

V213

simulated feature correlated to varrying degrees

V214

simulated feature correlated to varrying degrees

V215

simulated feature correlated to varrying degrees

V216

simulated feature correlated to varrying degrees

V217

simulated feature correlated to varrying degrees

V218

simulated feature correlated to varrying degrees

V219

simulated feature correlated to varrying degrees

V220

simulated feature correlated to varrying degrees

V221

simulated feature correlated to varrying degrees

V222

simulated feature correlated to varrying degrees

V223

simulated feature correlated to varrying degrees

V224

simulated feature correlated to varrying degrees

V225

simulated feature correlated to varrying degrees

V226

simulated feature correlated to varrying degrees

V227

simulated feature correlated to varrying degrees

V228

simulated feature correlated to varrying degrees

V229

simulated feature correlated to varrying degrees

V230

simulated feature correlated to varrying degrees

V231

simulated feature correlated to varrying degrees

V232

simulated feature correlated to varrying degrees

V233

simulated feature correlated to varrying degrees

V234

simulated feature correlated to varrying degrees

V235

simulated feature correlated to varrying degrees

V236

simulated feature correlated to varrying degrees

V237

simulated feature correlated to varrying degrees

V238

simulated feature correlated to varrying degrees

V239

simulated feature correlated to varrying degrees

V240

simulated feature correlated to varrying degrees

V241

simulated feature correlated to varrying degrees

V242

simulated feature correlated to varrying degrees

V243

simulated feature correlated to varrying degrees

V244

simulated feature correlated to varrying degrees

V245

simulated feature correlated to varrying degrees

V246

simulated feature correlated to varrying degrees

V247

simulated feature correlated to varrying degrees

V248

simulated feature correlated to varrying degrees

V249

simulated feature correlated to varrying degrees

V250

simulated feature correlated to varrying degrees

V251

simulated feature correlated to varrying degrees

V252

simulated feature correlated to varrying degrees

V253

simulated feature correlated to varrying degrees

V254

simulated feature correlated to varrying degrees

V255

simulated feature correlated to varrying degrees

V256

simulated feature correlated to varrying degrees

V257

simulated feature correlated to varrying degrees

V258

simulated feature correlated to varrying degrees

V259

simulated feature correlated to varrying degrees

V260

simulated feature correlated to varrying degrees

V261

simulated feature correlated to varrying degrees

V262

simulated feature correlated to varrying degrees

V263

simulated feature correlated to varrying degrees

V264

simulated feature correlated to varrying degrees

V265

simulated feature correlated to varrying degrees

V266

simulated feature correlated to varrying degrees

V267

simulated feature correlated to varrying degrees

V268

simulated feature correlated to varrying degrees

V269

simulated feature correlated to varrying degrees

V270

simulated feature correlated to varrying degrees

V271

simulated feature correlated to varrying degrees

V272

simulated feature correlated to varrying degrees

V273

simulated feature correlated to varrying degrees

V274

simulated feature correlated to varrying degrees

V275

simulated feature correlated to varrying degrees

V276

simulated feature correlated to varrying degrees

V277

simulated feature correlated to varrying degrees

V278

simulated feature correlated to varrying degrees

V279

simulated feature correlated to varrying degrees

V280

simulated feature correlated to varrying degrees

V281

simulated feature correlated to varrying degrees

V282

simulated feature correlated to varrying degrees

V283

simulated feature correlated to varrying degrees

V284

simulated feature correlated to varrying degrees

V285

simulated feature correlated to varrying degrees

V286

simulated feature correlated to varrying degrees

V287

simulated feature correlated to varrying degrees

V288

simulated feature correlated to varrying degrees

V289

simulated feature correlated to varrying degrees

V290

simulated feature correlated to varrying degrees

V291

simulated feature correlated to varrying degrees

V292

simulated feature correlated to varrying degrees

V293

simulated feature correlated to varrying degrees

V294

simulated feature correlated to varrying degrees

V295

simulated feature correlated to varrying degrees

V296

simulated feature correlated to varrying degrees

V297

simulated feature correlated to varrying degrees

V298

simulated feature correlated to varrying degrees

V299

simulated feature correlated to varrying degrees

V300

simulated feature correlated to varrying degrees

V301

simulated feature correlated to varrying degrees

V302

simulated feature correlated to varrying degrees

V303

simulated feature correlated to varrying degrees

V304

simulated feature correlated to varrying degrees

V305

simulated feature correlated to varrying degrees

V306

simulated feature correlated to varrying degrees

V307

simulated feature correlated to varrying degrees

V308

simulated feature correlated to varrying degrees

V309

simulated feature correlated to varrying degrees

V310

simulated feature correlated to varrying degrees

V311

simulated feature correlated to varrying degrees

V312

simulated feature correlated to varrying degrees

V313

simulated feature correlated to varrying degrees

V314

simulated feature correlated to varrying degrees

V315

simulated feature correlated to varrying degrees

V316

simulated feature correlated to varrying degrees

V317

simulated feature correlated to varrying degrees

V318

simulated feature correlated to varrying degrees

V319

simulated feature correlated to varrying degrees

V320

simulated feature correlated to varrying degrees

V321

simulated feature correlated to varrying degrees

V322

simulated feature correlated to varrying degrees

V323

simulated feature correlated to varrying degrees

V324

simulated feature correlated to varrying degrees

V325

simulated feature correlated to varrying degrees

V326

simulated feature correlated to varrying degrees

V327

simulated feature correlated to varrying degrees

V328

simulated feature correlated to varrying degrees

V329

simulated feature correlated to varrying degrees

V330

simulated feature correlated to varrying degrees

V331

simulated feature correlated to varrying degrees

V332

simulated feature correlated to varrying degrees

V333

simulated feature correlated to varrying degrees

V334

simulated feature correlated to varrying degrees

V335

simulated feature correlated to varrying degrees

V336

simulated feature correlated to varrying degrees

V337

simulated feature correlated to varrying degrees

V338

simulated feature correlated to varrying degrees

V339

simulated feature correlated to varrying degrees

V340

simulated feature correlated to varrying degrees

V341

simulated feature correlated to varrying degrees

V342

simulated feature correlated to varrying degrees

V343

simulated feature correlated to varrying degrees

V344

simulated feature correlated to varrying degrees

V345

simulated feature correlated to varrying degrees

V346

simulated feature correlated to varrying degrees

V347

simulated feature correlated to varrying degrees

V348

simulated feature correlated to varrying degrees

V349

simulated feature correlated to varrying degrees

V350

simulated feature correlated to varrying degrees

V351

simulated feature correlated to varrying degrees

V352

simulated feature correlated to varrying degrees

V353

simulated feature correlated to varrying degrees

V354

simulated feature correlated to varrying degrees

V355

simulated feature correlated to varrying degrees

V356

simulated feature correlated to varrying degrees

V357

simulated feature correlated to varrying degrees

V358

simulated feature correlated to varrying degrees

V359

simulated feature correlated to varrying degrees

V360

simulated feature correlated to varrying degrees

V361

simulated feature correlated to varrying degrees

V362

simulated feature correlated to varrying degrees

V363

simulated feature correlated to varrying degrees

V364

simulated feature correlated to varrying degrees

V365

simulated feature correlated to varrying degrees

V366

simulated feature correlated to varrying degrees

V367

simulated feature correlated to varrying degrees

V368

simulated feature correlated to varrying degrees

V369

simulated feature correlated to varrying degrees

V370

simulated feature correlated to varrying degrees

V371

simulated feature correlated to varrying degrees

V372

simulated feature correlated to varrying degrees

V373

simulated feature correlated to varrying degrees

V374

simulated feature correlated to varrying degrees

V375

simulated feature correlated to varrying degrees

V376

simulated feature correlated to varrying degrees

V377

simulated feature correlated to varrying degrees

V378

simulated feature correlated to varrying degrees

V379

simulated feature correlated to varrying degrees

V380

simulated feature correlated to varrying degrees

V381

simulated feature correlated to varrying degrees

V382

simulated feature correlated to varrying degrees

V383

simulated feature correlated to varrying degrees

V384

simulated feature correlated to varrying degrees

V385

simulated feature correlated to varrying degrees

V386

simulated feature correlated to varrying degrees

V387

simulated feature correlated to varrying degrees

V388

simulated feature correlated to varrying degrees

V389

simulated feature correlated to varrying degrees

V390

simulated feature correlated to varrying degrees

V391

simulated feature correlated to varrying degrees

V392

simulated feature correlated to varrying degrees

V393

simulated feature correlated to varrying degrees

V394

simulated feature correlated to varrying degrees

V395

simulated feature correlated to varrying degrees

V396

simulated feature correlated to varrying degrees

V397

simulated feature correlated to varrying degrees

V398

simulated feature correlated to varrying degrees

V399

simulated feature correlated to varrying degrees

V400

simulated feature correlated to varrying degrees


Initial FREEtree call which then calls actual FREEtree methods depending on parameters being passed through.

Description

Initial FREEtree call which then calls actual FREEtree methods depending on parameters being passed through.

Usage

FREEtree(
  data,
  fixed_regress = NULL,
  fixed_split = NULL,
  var_select = NULL,
  power = 6,
  minModuleSize = 1,
  cluster,
  maxdepth_factor_screen = 0.04,
  maxdepth_factor_select = 0.5,
  Fuzzy = TRUE,
  minsize_multiplier = 5,
  alpha_screen = 0.2,
  alpha_select = 0.2,
  alpha_predict = 0.05
)

Arguments

data

data to train or test FREEtree on.

fixed_regress

user specified char vector of regressors that will never be screened out; if fixed_regress = NULL, method uses PC as regressor at screening step.

fixed_split

user specified char vector of features to be used in splitting with certainty.

var_select

a char vector containing features to be selected. These features will be clustered by WGCNA and the chosen ones will be used in regression and splitting.

power

soft thresholding power parameter of WGCNA.

minModuleSize

WGCNA's minimum module size parameter.

cluster

the variable name of each cluster (in terms of random effect) using glmer's implementation.

maxdepth_factor_screen

when selecting features from one module, the maxdepth of the glmertree is set to ceiling function of maxdepth_factor_screen*(features in that module). Default is 0.04.

maxdepth_factor_select

Given screened features (from each modules, if Fuzzy=FALSE, that is the selected non-grey features from each non-grey modules), we want to select again from those screened features. The maxdepth of that glmertree is set to be ceiling of maxdepth_factor_select*(#screened features). Default is 0.6. for the maxdepth of the prediction tree (final tree), maxdepth is set to the length of the split_var (fixed+chosen ones).

Fuzzy

boolean to indicate desire to screen like Fuzzy Forest if Fuzzy = TRUE; if Fuzzy= FALSE, first screen within non-grey modules and then select the final non-grey features within the selected ones from each non-grey module; Use this final non-grey features as regressors (plus fixed_regress) and use grey features as split_var to select grey features. Then use final non-grey features and selected grey features together in splitting and regression variables, to do the final prediction. Fuzzy=FALSE is used if there are so many non-grey features and you want to protect grey features.

minsize_multiplier

At the final prediction tree, the minsize = minsize_multiplier times the length of final regressors. The default is 5. Note that we only set minsize for the final prediction tree instead of trees at the feature selection step since during feature selection, we don't have to be so careful. Note that when tuning the parameters, larger alpha and samller minsize_multiplier will result in deeper tree and therefore may cause overfitting problem. It is recommended to decrease alpha and decrease minsize_multiplier at the same time.

alpha_screen

alpha used in screening step.

alpha_select

alpha used in selection step.

alpha_predict

alpha used in prediction step.

Value

a glmertree object (trained tree).

Examples

#locate example data file
dataf <- system.file("data/data.RData", package="FREEtree")
mytree = FREEtree(data,fixed_regress=c("time","time2"), fixed_split=c("treatment"),
                  var_select=paste("V",1:200,sep=""), minModuleSize = 5,
                  cluster="patient", Fuzzy=TRUE, maxdepth_factor_select = 0.5,
                  maxdepth_factor_screen = 0.04, minsize_multiplier = 5,
                  alpha_screen = 0.2, alpha_select=0.2,alpha_predict=0.05)

Version of FREEtree called when fixed_regress is NULL, uses principal components (PC) as regressors for non-grey modules.

Description

Version of FREEtree called when fixed_regress is NULL, uses principal components (PC) as regressors for non-grey modules.

Usage

FREEtree_PC(
  data,
  fixed_split,
  var_select,
  power,
  minModuleSize,
  cluster,
  maxdepth_factor_screen,
  maxdepth_factor_select,
  Fuzzy,
  minsize_multiplier,
  alpha_screen,
  alpha_select,
  alpha_predict
)

Arguments

data

data to train or test FREEtree on.

fixed_split

user specified char vector of features to be used in splitting with certainty.

var_select

a char vector containing features to be selected. These features will be clustered by WGCNA and the chosen ones will be used in regression and splitting.

power

soft thresholding power parameter of WGCNA.

minModuleSize

WGCNA's minimum module size parameter.

cluster

the variable name of each cluster (in terms of random effect) using glmer's implementation.

maxdepth_factor_screen

when selecting features from one module, the maxdepth of the glmertree is set to ceiling function of maxdepth_factor_screen*(features in that module). Default is 0.04.

maxdepth_factor_select

Given screened features (from each modules, if Fuzzy=FALSE, that is the selected non-grey features from each non-grey modules), we want to select again from those screened features. The maxdepth of that glmertree is set to be ceiling of maxdepth_factor_select*(#screened features). Default is 0.6. for the maxdepth of the prediction tree (final tree), maxdepth is set to the length of the split_var (fixed+chosen ones).

Fuzzy

boolean to indicate desire to screen like Fuzzy Forest if Fuzzy = TRUE; if Fuzzy= FALSE, first screen within non-grey modules and then select the final non-grey features within the selected ones from each non-grey module; Use this final non-grey features as regressors (plus fixed_regress) and use grey features as split_var to select grey features. Then use final non-grey features and selected grey features together in splitting and regression variables, to do the final prediction. Fuzzy=FALSE is used if there are so many non-grey features and you want to protect grey features.

minsize_multiplier

At the final prediction tree, the minsize = minsize_multiplier times the length of final regressors. The default is 5. Note that we only set minsize for the final prediction tree instead of trees at the feature selection step since during feature selection, we don't have to be so careful. Note that when tuning the parameters, larger alpha and samller minsize_multiplier will result in deeper tree and therefore may cause overfitting problem. It is recommended to decrease alpha and decrease minsize_multiplier at the same time.

alpha_screen

alpha used in screening step.

alpha_select

alpha used in selection step.

alpha_predict

alpha used in prediction step.

Value

a glmertree object (trained tree). dictionary'with keys=name of color,values=names of features of that color


Version of FREEtree called when var_select and fixed_regress are specified,

Description

Version of FREEtree called when var_select and fixed_regress are specified,

Usage

FREEtree_time(
  data,
  fixed_regress,
  fixed_split,
  var_select,
  power,
  minModuleSize,
  cluster,
  maxdepth_factor_screen,
  maxdepth_factor_select,
  Fuzzy,
  minsize_multiplier,
  alpha_screen,
  alpha_select,
  alpha_predict
)

Arguments

data

data to train or test FREEtree on.

fixed_regress

user specified char vector of regressors that will never be screened out; if fixed_regress = NULL, method uses PC as regressor at screening step.

fixed_split

user specified char vector of features to be used in splitting with certainty.

var_select

a char vector containing features to be selected. These features will be clustered by WGCNA and the chosen ones will be used in regression and splitting.

power

soft thresholding power parameter of WGCNA.

minModuleSize

minimum possible module size parameter of WGCNA.

cluster

the variable name of each cluster (in terms of random effect) using glmer's implementation.

maxdepth_factor_screen

when selecting features from one module, the maxdepth of the glmertree is set to ceiling function of maxdepth_factor_screen*(features in that module). Default is 0.04.

maxdepth_factor_select

Given screened features (from each modules, if Fuzzy=FALSE, that is the selected non-grey features from each non-grey modules), we want to select again from those screened features. The maxdepth of that glmertree is set to be ceiling of maxdepth_factor_select*(#screened features). Default is 0.6. for the maxdepth of the prediction tree (final tree), maxdepth is set to the length of the split_var (fixed+chosen ones).

Fuzzy

boolean to indicate desire to screen like Fuzzy Forest if Fuzzy = TRUE; if Fuzzy= FALSE, first screen within non-grey modules and then select the final non-grey features within the selected ones from each non-grey module; Use this final non-grey features as regressors (plus fixed_regress) and use grey features as split_var to select grey features. Then use final non-grey features and selected grey features together in splitting and regression variables, to do the final prediction. Fuzzy=FALSE is used if there are so many non-grey features and you want to protect grey features.

minsize_multiplier

At the final prediction tree, the minsize = minsize_multiplier times the length of final regressors. The default is 5. Note that we only set minsize for the final prediction tree instead of trees at the feature selection step since during feature selection, we don't have to be so careful. Note that when tuning the parameters, larger alpha and samller minsize_multiplier will result in deeper tree and therefore may cause overfitting problem. It is recommended to decrease alpha and decrease minsize_multiplier at the same time.

alpha_screen

alpha used in screening step.

alpha_select

alpha used in selection step.

alpha_predict

alpha used in prediction step.

Value

a glmertree object (trained tree). dictionary' with keys=name of color,values=names of features of that color


Method for extracting names of splitting features used in a tree.

Description

Method for extracting names of splitting features used in a tree.

Usage

get_split_names(tree, data)

Arguments

tree

a tree object.

data

train or test set.

Value

names of splitting features extracted from tree object.