dualbounds.dist_reg.DistReg¶
- class dualbounds.dist_reg.DistReg(how_transform)[source]¶
A generic class for distributional regressions, meant for subclassing.
- Parameters:¶
- how_transform : str¶
Str specifying how to transform the features before fitting the underlying model. One of several options:
’identity’: does not transform the features
’intercept’: adds an intercept
’interactions’ : adds treatment-covariate interactions
The default is
interactions.
Notes
To inherit from this class, simply define the
fitandpredictfunctions, ensuring that they match the signature in the docs for this class.Methods
feature_transform(W, X[, Z])Transforms the features before feeding them to the base model.
features_to_WX(features)Inverse of feature_transform.
fit(W, X, y[, Z, sample_weight])Fits model on the data.
predict(X, W, Z)Predicts the conditional law of the outcome.
Predicts counterfactual distributions of Y (outcome).