openasce.extension package¶
Subpackages¶
- openasce.extension.debias package
- Subpackages
- Submodules
- openasce.extension.debias.cfr module
- openasce.extension.debias.debias_ips module
- openasce.extension.debias.dice module
- openasce.extension.debias.dmbr module
- openasce.extension.debias.doubly_robust module
- openasce.extension.debias.fairco module
- openasce.extension.debias.ipw module
- openasce.extension.debias.macr module
- openasce.extension.debias.pda module
Submodules¶
openasce.extension.debias_model module¶
- class openasce.extension.debias_model.CausalDebiasModel[source]¶
Bases:
RuntimeDebias Inference Class
Base class of the causal debias
Attributes:
- fit(*, X: Iterable[ndarray] = None, Y: Iterable[ndarray] = None, C: Dict[str, Iterable[ndarray]] = None, Z: Iterable[Tuple[ndarray, ndarray, Dict[str, ndarray]]] = None, num_epochs: int = 1, **kwargs) None[source]¶
Feed the sample data and train the model on the samples.
- Parameters
X – Features of the samples.
Y – Outcomes of the samples.
C – Other concerned columns of the samples, e.g. {‘weight’: Iterable[np.ndarray]}
Z – The iterable object returning (a batch of X, a batch of Y, a batch of C) if having
num_epochs – number of the train epoch
- Returns
None
- predict(*, X: Iterable[ndarray] = None, C: Dict[str, Iterable[ndarray]] = None, Z: Iterable[Tuple[ndarray, ndarray, Dict[str, ndarray]]] = None, **kwargs) None[source]¶
Feed the sample data
Estimate the effect on the samples, and get_result method can be used to get the result of prediction
- Parameters
X – Features of the samples.
C – Other concerned columns of the samples, e.g. {‘weight’: Iterable[np.ndarray]}
Z – The iterable object returning (a batch of X, a batch of Y, a batch of C) if having
- Returns
None