match_predict_xgb: match_predict_xgb

Description Usage Arguments Value

View source: R/match_predict_xgb.R

Description

Function to predict treatment / control pairs using xgboost. The returned function takes in training and test data (output from predict_prepare), trains an xgboost model on the training, predicts on the test, and returns the test vector

Usage

1
2
3
4
5
6
match_predict_xgb(
  nrounds = 50,
  nthread = 1,
  params = list(eta = 0.1, max.depth = 4),
  ...
)

Arguments

nrounds

Training rounds for the xgb algorithm.

nthread

Number of threads to use for fitting, default 1.

params

List of params to pass to xgboost, most likely something like eta and max.depth

...

Additional xgboost params.

Value

Returns a function that takes in a train_test_list from predict_prepare; this function returns a vector of predictions for the test data.


rzgross/uRbanmatching documentation built on Dec. 22, 2021, 8:20 p.m.