causalnex.structure.notears.from_pandas_lasso¶
-
causalnex.structure.notears.
from_pandas_lasso
(X, beta, max_iter=100, h_tol=1e-08, w_threshold=0.0, tabu_edges=None, tabu_parent_nodes=None, tabu_child_nodes=None)[source]¶ Learn the StructureModel, the graph structure with lasso regularisation describing conditional dependencies between variables in data presented as a pandas dataframe.
Based on DAGs with NO TEARS. @inproceedings{zheng2018dags,
author = {Zheng, Xun and Aragam, Bryon and Ravikumar, Pradeep and Xing, Eric P.}, booktitle = {Advances in Neural Information Processing Systems}, title = {{DAGs with NO TEARS: Continuous Optimization for Structure Learning}}, year = {2018}, codebase = {https://github.com/xunzheng/notears}}
Parameters: - X (
DataFrame
) – input data. - beta (
float
) – Constant that multiplies the lasso term. - max_iter (
int
) – max number of dual ascent steps during optimisation. - h_tol (
float
) – exit if h(W) < h_tol (as opposed to strict definition of 0). - w_threshold (
float
) – fixed threshold for absolute edge weights. - tabu_edges (
Optional
[List
[Tuple
[str
,str
]]]) – list of edges(from, to) not to be included in the graph. - tabu_parent_nodes (
Optional
[List
[str
]]) – list of nodes banned from being a parent of any other nodes. - tabu_child_nodes (
Optional
[List
[str
]]) – list of nodes banned from being a child of any other nodes.
Returns: graph of conditional dependencies between data variables.
Return type: Raises: ValueError
– If X does not contain data.- X (