This function selects the best direction for the CCI test based on cross validation. For the condition Y || X | Z, the function return the recommended formula either Y ~ X | Z or X ~ Y | Z .
CCI.direction(
formula,
data,
method = "rf",
folds = 4,
nrounds = 600,
max_depth = 6,
eta = 0.3,
gamma = 0,
colsample_bytree = 1,
min_child_weight = 1,
subsample = 1,
poly = TRUE,
degree = 3,
interaction = TRUE,
verbose = FALSE,
...
)A formula object specifying the selected model direction.
A formula object specifying the model to be fitted.
A data frame containing the variables specified in the formula.
A character string specifying the method to be used for model fitting. Options include "rf" (random forest), "xgboost" (XGBoost), "nnet" (neural network), "gpr" (Gaussian process regression), and "svm" (support vector machine).
An integer specifying the number of folds for cross-validation. Default is 4.
Integer. The number of rounds (trees) for methods like xgboost, ranger, and lightgbm. Default is 600.
Integer. The maximum depth of the trees for methods like xgboost. Default is 6.
Numeric. The learning rate for methods like xgboost. Default is 0.3.
Numeric. The minimum loss reduction required to make a further partition on a leaf node of the tree for methods like xgboost. Default is 0.
Numeric. The subsample ratio of columns when constructing each tree for methods like xgboost. Default is 1.
Numeric. The minimum sum of instance weight (hessian) needed in a child for methods like xgboost. Default is 1.
Numeric. The proportion of the data to be used for subsampling. Default is 1 (no subsampling).
Logical. If TRUE, polynomial terms of the conditioning variables are included in the model. Default is TRUE.
Integer. The degree of polynomial terms to include if poly is TRUE. Default is 3.
Logical. If TRUE, interaction terms of the conditioning variables are included in the model. Default is TRUE.
Logical. If TRUE, prints additional information during the execution. Default is FALSE.
Additional arguments to be passed to the model fitting function.