How to use the causallib.simulation.CausalSimulator3.CausalSimulator3._linear_link function in causallib

To help you get started, we’ve selected a few causallib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / causallib / causallib / simulation / CausalSimulator3.py View on Github external
Args:
            X_parents (pd.DataFrame): a (num_samples x num_parents) matrix containing the data (over all samples or
                                      samples or patients) of the variables which are topological parents of the current
                                      variable
            beta (pd.Series): Optional, a given Series which index corresponds to the parents variables
                              (X_parents.columns)

        Returns:
            (pd.Series, pd.Series): 2-element tuple containing:

            - **X_new** (*pd.Series*): Newly created signal.
            - **beta** (*pd.Series*): The coefficients used to create the linear link.
        """
        X_parents = X_parents.copy()  # type: pd.DataFrame
        X_parents["intercept"] = 1
        return CausalSimulator3._linear_link(X_parents, beta=beta)
github IBM / causallib / causallib / simulation / CausalSimulator3.py View on Github external
    G_LINKING_METHODS = {"linear": lambda x, beta=None: CausalSimulator3._linear_link(x, beta),
                         "affine": lambda x, beta=None: CausalSimulator3._affine_link(x, beta),

causallib

A Python package for flexible and modular causal inference modeling

Apache-2.0
Latest version published 3 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages