Learn R Programming

iai (version 1.3.0)

fit_predict: Fit a reward estimation model on features, treatments and outcomes and return predicted counterfactual rewards for each observation.

Description

Julia Equivalent: IAI.fit_predict!

Usage

fit_predict(lnr, X, treatments, outcomes)

Arguments

lnr

The learner or grid to use for imputation

X

The features of the data.

treatments

The treatment applied to each point in the data.

outcomes

The outcome observed for each point in the data.

Examples

Run this code
# NOT RUN {
X <- iris
X[1, 1] <- NA
grid <- iai::grid_search(
    iai::imputation_learner(),
    method = c("opt_knn", "opt_tree"),
)
iai::fit_transform(grid, X)
# }

Run the code above in your browser using DataLab