fit_model | R Documentation |
This function trains a given unfitted model with the provided data and parameters, according to model type and learner type.
fit_model(model, X, Y, D, model_type, learner_type, model_params, propensity)
model |
An unfitted model object, as returned by 'set_model'. |
X |
A matrix or data frame of covariates for the samples. |
Y |
A vector of outcome values. |
D |
A vector of binary treatment indicators (1 for treated, 0 for untreated). |
model_type |
The model type for policy learning. Options include |
learner_type |
The learner type for the chosen model. Options include |
model_params |
A list of additional parameters to pass to the model, which can be any parameter defined in the model reference package. Defaults to |
propensity |
The propensity score |
The fitted model object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.