openasce.attribution package¶
- class openasce.attribution.Attribution(*, threshold: float, max_step: int = 2, top_num: int = None)[source]¶
Bases:
RuntimeAttribution Class
Attributes:
Constructor
- Argument:
threshold: the score threshold max_step: the maximal step. For the attribution based on causal graph, that is the maximal node number. top_num: the accepted number of best options in each step, which is used in greedy attribution.
- __doc__ = 'Attribution Class\n\n Attributes:\n\n '¶
- __init__(*, threshold: float, max_step: int = 2, top_num: int = None) None[source]¶
Constructor
- Argument:
threshold: the score threshold max_step: the maximal step. For the attribution based on causal graph, that is the maximal node number. top_num: the accepted number of best options in each step, which is used in greedy attribution.
- __module__ = 'openasce.attribution.attribution_model'¶
- attribute(*, X: Iterable[ndarray], Y: Iterable[ndarray] = None, T: Iterable[ndarray] = None, **kwargs) None[source]¶
Feed the sample data to attribute.
- Parameters
X – Features of the samples.
Y – Ignore for now and keep for future
T – Ignore for now and keep for future
kwargs – {‘treat_value’: treat_value}, maximization when treat_value
- Returns
None
- property column_names¶
All nodes’ name. Note: should include the treatment node and label node.
- property inferencer: InferenceModel¶
The inference object used to estimate the effect
- property label_name¶
- property label_value¶
- property treatment_name¶
Submodules¶
openasce.attribution.attribution_model module¶
- class openasce.attribution.attribution_model.Attribution(*, threshold: float, max_step: int = 2, top_num: int = None)[source]¶
Bases:
RuntimeAttribution Class
Attributes:
Constructor
- Argument:
threshold: the score threshold max_step: the maximal step. For the attribution based on causal graph, that is the maximal node number. top_num: the accepted number of best options in each step, which is used in greedy attribution.
- __annotations__ = {}¶
- __doc__ = 'Attribution Class\n\n Attributes:\n\n '¶
- __init__(*, threshold: float, max_step: int = 2, top_num: int = None) None[source]¶
Constructor
- Argument:
threshold: the score threshold max_step: the maximal step. For the attribution based on causal graph, that is the maximal node number. top_num: the accepted number of best options in each step, which is used in greedy attribution.
- __module__ = 'openasce.attribution.attribution_model'¶
- attribute(*, X: Iterable[ndarray], Y: Iterable[ndarray] = None, T: Iterable[ndarray] = None, **kwargs) None[source]¶
Feed the sample data to attribute.
- Parameters
X – Features of the samples.
Y – Ignore for now and keep for future
T – Ignore for now and keep for future
kwargs – {‘treat_value’: treat_value}, maximization when treat_value
- Returns
None
- property column_names¶
All nodes’ name. Note: should include the treatment node and label node.
- property inferencer: InferenceModel¶
The inference object used to estimate the effect
- property label_name¶
- property label_value¶
- property treatment_name¶