dualbounds.dist_reg.BinaryDistReg.fit¶
-
BinaryDistReg.fit(W: array, X: array, y: array, Z: array | None =
None, sample_weight: array | None =None) None[source]¶ Fits model on the data.
- Parameters:¶
- 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 instrument values for the instrumental variables setting.
- sample_weight : np.array¶
Optional n-length array of weights to use when fitting the underlying model.
Notes
Not all model_types can be trained using sample_weight. For some models (e.g. KNNRegressors), including sample_weight will yield an error.