dowhy.utils package

Submodules

dowhy.utils.api module

dowhy.utils.api.parse_state(state)[source]

dowhy.utils.cli_helpers module

dowhy.utils.cli_helpers.query_yes_no(question, default=True)[source]

Ask a yes/no question via standard input and return the answer.

Source: https://stackoverflow.com/questions/3041986/apt-command-line-interface-like-yes-no-input

If invalid input is given, the user will be asked until they actually give valid input. Args:

question(str): A question that is presented to the user. default(bool|None): The default value when enter is pressed with no value. When None, there is no default value and the query will loop.

Returns:

A bool indicating whether user has entered yes or no.

Side Effects:

Blocks program execution until valid input(y/n) is given.

dowhy.utils.dgp module

class dowhy.utils.dgp.DataGeneratingProcess(**kwargs)[source]

Bases: object

Base class for implementation of data generating process.

Subclasses implement functions that create various data generating processes. All data generating processes are in the package “dowhy.utils.dgps”.

DEFAULT_PERCENTILE = 0.9
convert_to_binary(data, deterministic=False)[source]
generate_data()[source]
generation_process()[source]

dowhy.utils.propensity_score module

dowhy.utils.propensity_score.binarize_discrete(data, covariates, variable_types)[source]
dowhy.utils.propensity_score.binary_treatment_model(data, covariates, treatment, variable_types)[source]
dowhy.utils.propensity_score.categorical_treatment_model(data, covariates, treatment, variable_types)[source]
dowhy.utils.propensity_score.continuous_treatment_model(data, covariates, treatment, variable_types)[source]
dowhy.utils.propensity_score.discrete_to_integer(discrete)[source]
dowhy.utils.propensity_score.get_type_string(variables, variable_types)[source]
dowhy.utils.propensity_score.propensity_of_treatment_score(data, covariates, treatment, model='logistic', variable_types=None)[source]
dowhy.utils.propensity_score.state_propensity_score(data, covariates, treatments, variable_types=None)[source]

Module contents