dualbounds.dist_reg.ModelSelector.select_model¶
-
ModelSelector.select_model(models: list[DistReg], W: array, X: array, y: array, Z: array | None =
None, sample_weight: array | None =None, propensities: array | None =None, **kwargs) DistReg[source]¶ - Parameters:¶
- models : list¶
list of
dist_reg.DistRegclasses.- W : np.array¶
n-length array of binary treatment indicators.
- X : np.array¶
(n, p)-shaped array of covariates.
- y : np.array¶
n-length array of outcome measurements.
- Z : np.array¶
Optional n-length array of binary instrument values for the instrumental variables setting.
- propensities : np.array¶
Optional n-length array of propensity scores. This argument is only used when
model_selectoris provided.- sample_weight : np.array¶
Optional n-length array of weights to use when fitting the underlying model.
- Returns:¶
selected_model – The selected model.
- Return type:¶
dist_reg.DistReg