crf: Clustered random forest fitting

View source: R/main.R

crfR Documentation

Clustered random forest fitting

Description

Clustered random forest fitting

Usage

crf(
  formula,
  data,
  B = 500,
  L = 100,
  beta = 0.9,
  weight_optimiser = "Training MSE",
  correlation = "equicorr",
  maxdepth = 30,
  minbucket = 10,
  cp = 0,
  x0 = NULL,
  test_data = NULL,
  fixrho = FALSE,
  honesty = TRUE,
  verbose = TRUE,
  seed = NULL
)

Arguments

formula

an object of class 'formula' describing the model to fit.

data

training dataset for fitting the CRF. Note that group ID must be given by the column id.

B

the total number of trees (or trees per little bag if L\neq'NULL'). Default is 500.

L

the total number of little bags if providing a bootstrap of little bags estimate for inference. To not include set L='NULL'. Default is 'NULL'.

beta

the subsampling rate. Default is beta=0.9.

weight_optimiser

the method used to construct weights. Options are 'Pointwise variance', 'Training MSE' or 'Test MSE'. Default is 'Training MSE'.

correlation

the weight structure implemented. Currently supported options are 'ar1' and 'equicorr'. Default is 'equicorr'.

maxdepth

the maximum depth of the decision tree fitting. Default is 30.

minbucket

the minbucket of the decision tree fitting. Default is 10.

cp

the complexity paramter for decision tree fitting. Default is 0.

x0

the covariate point to optimise weights towards if 'weightoptimiser' set to 'Pointwise variance'.

test_data

the test dataset to optimise weights towards if 'weightoptimiser' set to 'Test MSE'.

fixrho

fixes a pre-specified weight structure, given by the relevant 'ar1' or 'equicorr' parameter. Default is 'FALSE' (optimise weights).

honesty

whether honest or dishonest trees to be fit. Default is 'TRUE'.

verbose

Logical indicating whether or not to print computational progress. Default is 'TRUE'.

seed

Random seed for sampling. Default is NULL.

Value

A clustered random forest fitted object


corrRF documentation built on April 3, 2025, 10:16 p.m.

Related to crf in corrRF...