Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
G_LINKING_METHODS = {"linear": lambda x, beta=None: CausalSimulator3._linear_link(x, beta),
"affine": lambda x, beta=None: CausalSimulator3._affine_link(x, beta),