Open Issues Need Help
View All on GitHubAI Summary: This issue proposes to refactor the `preprocess_data` method in `pgmpy/utils/utils.py`. The goal is to simplify the existing if-else structure used to determine if dataframe variables are numerical, categorical, or ordinal.
Python library for Causal AI
AI Summary: This issue proposes making the maximum size of the `lru_cache` in the `structure_score` module configurable. Currently, the cache size is fixed at 1e5, which can be a memory concern on systems with limited RAM. Allowing users to set this size during score class initialization would provide greater flexibility and resource management.
Python library for Causal AI
AI Summary: The `hungary_chickenpox` dataset is failing to load because the underlying ground truth data, when parsed as a Directed Acyclic Graph (DAG), contains cycles. This indicates an issue with the format or content of the ground truth definition for this specific dataset.
Python library for Causal AI
AI Summary: This issue reports doctest failures in the `pgmpy/sampling/Sampling.py` file. Specifically, `forward_sample` produces unexpected output, and `likelihood_weighted_sample` and `rejection_sample` raise a `TypeError` due to an unexpected keyword argument 'return_type'. The goal is to fix these doctest errors.
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue proposes adding a new variant to the Structural Hamming Distance (SHD) metric. The current SHD counts all edge differences as 1, but the enhancement would allow for reverse edge directions to be counted as 2, reflecting the cost of removing an edge and adding another.
Python library for Causal AI
Python library for Causal AI
AI Summary: A bug has been identified in the `power_divergence` test within the pgmpy library. The contingency table computation incorrectly handles edge cases where certain combinations of variable states are absent within a stratum. This leads to incomplete contingency tables, failing to represent all possible states of the variables.
Python library for Causal AI
AI Summary: This bug report indicates that the `tubingen/81` dataset is incorrectly tagged as not having missing data, when in fact it does. The issue requires correcting the existing tag and implementing a new test case to automatically verify the presence of NaN values against the dataset's tag.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue addresses failing doctests in the `DoubleMLRegressor.py` file, specifically related to the `fit` method. The error indicates a `UserWarning` from scikit-learn about fitting `LinearRegression` without feature names, suggesting a potential mismatch in how feature names are handled or expected during the fitting process.
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue addresses failing example notebooks within the `examples` directory. The goal is to fix the errors in the listed notebooks and ensure they pass tests by adding them to `notebook_test_list.txt`. Contributors are encouraged to pick a notebook and create a separate issue for their work.
Python library for Causal AI
AI Summary: This issue addresses a doctest failure in the `FunctionalCPD.sample` method within the pgmpy library. The error occurs because the `torch.as_tensor` function is being passed a string for the `dtype` argument instead of a `torch.dtype` object. The fix involves correcting the data type passed to `torch.as_tensor` to resolve the `TypeError`.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue addresses failing doctests in the `pgmpy/utils/state_name.py` file. The doctest for `state_name.StateNameMixin.store_state_names` is failing because it expects no output, but it's receiving a dictionary of state names. This indicates a discrepancy between the expected and actual behavior of the `store_state_names` method.
Python library for Causal AI
AI Summary: This issue is a documentation fix for doctest errors in the `DiscreteFactor` class. The doctest is failing because the memory address of the `DiscreteFactor` object is being compared, which is not stable. This likely requires updating the expected output in the doctest to be more robust or to remove the address comparison.
Python library for Causal AI
AI Summary: This issue addresses failing doctests in the `JointProbabilityDistribution` class within pgmpy. The failures occur in the `copy` and `minimal_imap` methods, specifically related to comparing boolean values and object representations. The goal is to fix these doctests to ensure the code behaves as expected.
Python library for Causal AI
AI Summary: This issue proposes adding `__repr__` and `__str__` methods to the `ExpertKnowledge` class. These methods will improve the usability of the class by providing concise summaries (`__repr__`) and full details (`__str__`) when inspecting `ExpertKnowledge` objects.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This enhancement proposes adding an `estimator` argument to the GCM conditional independence test in pgmpy. This will allow users to specify a scikit-learn compatible estimator for computing residuals, making the test more flexible than the current default least squares regression. The new argument will leverage the `fit` and `predict` methods of the provided estimator.
Python library for Causal AI
AI Summary: This enhancement proposes adding an `estimator` argument to the Pillai trace conditional independence test, similar to a previous issue. The goal is to allow the use of any scikit-learn estimator, with a specific requirement for a `predict_proba` method if discrete variables are present.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This enhancement request aims to improve the `list_models` and `list_datasets` methods in pgmpy. Currently, these methods fail silently when provided with an incorrect filtering argument (tag). The goal is to implement checks to validate these arguments and throw a meaningful error to the user when an unrecognized tag is used, providing better feedback and usability.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue proposes to improve the error handling for the `load_model` method in `pgmpy`. Currently, providing a non-existent model name results in a generic `IndexError`. The enhancement would involve raising a more informative `ValueError` that guides the user to use `list_models()` to find available models.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue reports that multiple doctests within the `DAG.py` file are failing. The goal is to update these doctests so that all provided examples execute successfully when run with `python -m doctest pgmpy/base/DAG.py`.
Python library for Causal AI
Python library for Causal AI
AI Summary: This bug report identifies an incorrect implementation in the `DiscreteBayesianNetwork.do` method. The current marginalization of do states from child states is wrong; instead, child node CPDs should be conditioned on the parent node's do state. This suggests a fundamental misunderstanding or misapplication of the do-calculus in the current code.
Python library for Causal AI
Python library for Causal AI
AI Summary: The `structure_score.py` docstring contains an example that uses an incorrect scoring method ('bic-g') for a discrete dataset. The error message indicates that 'bic-d' should be used instead. This issue requires updating the docstring to reflect the correct scoring method for discrete models.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: This enhancement request aims to add `load` and `save` methods to the `LinearGaussianBayesianNetwork` (LGBN) class, similar to those available for `DiscreteBayesianNetwork`. These methods will serialize and deserialize LGBN models using a previously defined JSON file format. The implementation should leverage existing JSON loading code and update related components to utilize the new methods.
Python library for Causal AI
AI Summary: This issue proposes refactoring remaining example models into the `pgmpy/example_models` module, similar to recently moved models. Developers need to create individual files for each listed discrete, continuous, and DAG model, defining their respective tags.
Python library for Causal AI
Python library for Causal AI
AI Summary: This issue proposes refactoring the GES (Greedy Equivalence Search) algorithm to align with the scikit-learn API. The goal is to make the algorithm more integrated and user-friendly within the scikit-learn ecosystem, with further details available in a parent issue.
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
Python library for Causal AI
AI Summary: Implement a `log_likelihood` method for the `LinearGaussianBayesianNetwork` class in the pgmpy Python library, mirroring the functionality already added (or planned) for other Bayesian network types. This involves calculating the log-likelihood of a dataset given a fitted Linear Gaussian Bayesian Network model.
Python library for Causal AI
AI Summary: The task is to fix a bug in the pgmpy library where models with commas in state names cannot be saved and loaded correctly. The solution involves improving the handling of commas in state names during file I/O, potentially by adding warnings or using a more robust delimiter.
Python library for Causal AI