dualbounds.dist_reg.QuantileDistReg¶
-
class dualbounds.dist_reg.QuantileDistReg(nquantiles: int =
50, alphas: list =[0], how_transform: str ='interactions')[source]¶ A continuous distributional regression based on quantile regression.
- Parameters:¶
- nquantiles : int¶
The number of quantiles to fit quantile regressions for. Quantiles are evenly spaced between 0 and 1.
- alphas : list or np.array¶
List of l1 regularization strengths to use in the quantile regression; the final strength is determined by cross-validation. Default is alphas=[0] (no regularization).
- 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
This method is computationally expensive for large datasets.
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).