XGBoostSub_bin {BioPred}R Documentation

XGBoost Model with Modified Loss Function for Subgroup Identification with Binary Outcomes

Description

Function for training XGBoost model with customized loss function for binary outcomes

Usage

XGBoostSub_bin(
  X_data,
  y_data,
  trt,
  pi,
  Loss_type = "A_learning",
  params = list(),
  nrounds = 50,
  disable_default_eval_metric = 1,
  verbose = TRUE
)

Arguments

X_data

The input features matrix.

y_data

The input y matrix.

trt

The treatment indicator vector. Should take values of 1 or -1, where 1 represents the treatment group and -1 represents the control group.

pi

The propensity scores vector, which should range from 0 to 1, representing the probability of assignment to treatment.

Loss_type

Type of loss function to use: "A_learning" or "Weight_learning".

params

A list of additional parameters for the xgb.train function.

nrounds

Number of boosting rounds. Default is 50.

disable_default_eval_metric

If 1, default evaluation metric will be disabled.

verbose

Logical. If TRUE, training progress will be printed; if FALSE, no progress will be printed.

Details

XGBoostSub_bin: Function for Training XGBoost Model with Customized Loss Function for binary outcomes

This function trains an XGBoost model using a customized loss function based on the A-learning and weight-learning.

This function requires the 'xgboost' library. Make sure to install and load the 'xgboost' library before using this function.

After running this function, the returned model can be used like a regular xgboost model.

Value

Trained XGBoostSub_bin model.


[Package BioPred version 1.0.1 Index]