evalerror_reg: Weighted mean squared error for complex survey data

View source: R/wxgb.error.R

evalerror_regR Documentation

Weighted mean squared error for complex survey data

Description

A function to evaluate XGBoost models by weighted mean squared error for linear regression. This function is a customized error function for complex survey data.

Usage

evalerror_reg(preds, dtrain)

Arguments

preds

Predicted values from the model

dtrain

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

Value

A list of two components:

  • metric: A string labelled as weighted.mse.

  • value : A numeric value of weighted mean squared error (MSE).

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.