evalerror_bin: Weighted mean error of binary outcome for complex survey data

View source: R/wxgb.error.R

evalerror_binR Documentation

Weighted mean error of binary outcome for complex survey data

Description

A function to evaluate XGBoost models by weighted mean error for binary outcome (0/1). This function is a customized error function to plug in the function wXGBoost() for complex survey data.

Usage

evalerror_bin(preds, dtrain)

Arguments

preds

Predicted binary values (0/1) from the model.

dtrain

An object of xgboost::xgb.DMatrix including label(response variable or binary outcome), data, and weight.

Value

A list of two components:

  • metric : A string labelled as weighted.error.

  • value : A numeric value of weighted mean error.

See Also

xgboost::xgb.train() for relevant arguments and return values in detail.

wXGBoost() for detailed information on implementation.

optim_wxgb_para() for detailed optimization and examples.


MLSurvey documentation built on Nov. 18, 2026, 5:11 p.m.