Cai-causal-graph

Latest version: v0.5.8

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 10

0.4.7

- Added the `cai_causal_graph.causal_graph.identify_utils.identity_colliders` utility function, which allows you to
identify a list of colliders in a `cai_causal_graph.causal_graph.CausalGraph`.
- Improved efficiency of `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_nodes_at_lag` and
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_nodes_for_variable_name` by adding caching.
- Updated `networkx` dependency from `">=3.0.0, <4.0.0"` to `">=3.0.0, <3.3.0"` and `networkx` have claimed to fix a bug
with simple paths and other related functions, but this now introduces paths of length 1 which we do not want. Also
updated `pyproject.toml` to allow different `networkx` versions for `python` `3.8` and `3.9` - `3.12` as `networkx`
`3.1` is the last one that supports `3.8`.
- Upgraded `poetry` version from `1.7.1` to `1.8.2` in the GitHub workflows.

0.4.6

- Added the Boolean keyword argument `include_all_parents` to
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.extend_graph`. When `True` extra nodes may be added.
Nodes and edges will be added as far back that all nodes up to `backward_steps` in the past have all their parents
and inbound edges. This means that the extended graph may now have nodes at lags further back than `backward_steps`.
Default is `False`, meaning the default behavior of the method has not changed.
- Added the Boolean keyword argument `construct_minimal` to
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.from_adjacency_matrices` to allow the user to specify
whether to construct a minimal graph from adjacency matrices. Default is `True`, making the change backwards
compatible.
- Fixed a bug in the `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.from_adjacency_matrices`
method of `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` that was introduced in the previous
release. The method was not properly handling undirected edges in the adjacency matrices.
- Fixed a bug in the `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.to_numpy_by_lag` method of
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` where it was not always returning the correct
variable names.
- Fixed a bug in the `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.adjacency_matrices` property of
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` where it was not looking at the variable names
of the minimal graph, as expected, but the variables names of the full graph.
- Removed the `return_minimal` argument from the
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.adjacency_matrices` property of
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` as this was never working.

0.4.5

- Fixed a bug in `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.from_adjacency_matrices` for
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` where the method was not handling properly
undirected edges in the adjacency matrices.
- Added `mypy-extensions` dependency as `"^1.0.0"` and moved `mypy` back to dev dependency (setting it as `"^1.8.0"`).

0.4.4

- Relaxed `mypy` dependency to `"*"`.

0.4.3

- Added the `cai_causal_graph.causal_graph.CausalGraph.replace_edge` method to the
`cai_causal_graph.causal_graph.CausalGraph` class, which allows you to replace an existing edge with a new one.
- Added the `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_nodes_for_variable_name` method to the
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` class.
- Added the `cai_causal_graph.graph_components.Node.is_source_node` and
`cai_causal_graph.graph_components.Node.is_sink_node` methods to the `cai_causal_graph.graph_components.Node`,
indicating whether the node is a source node or sink node respectively.
- Changed the following methods in `cai_causal_graph.causal_graph.CausalGraph` from static to class methods:
- `cai_causal_graph.causal_graph.CausalGraph.from_skeleton`
- `cai_causal_graph.causal_graph.CausalGraph.from_networkx`
- `cai_causal_graph.causal_graph.CausalGraph.from_gml_string`
- Note that `cai_causal_graph.causal_graph.CausalGraph.from_dict` and
`cai_causal_graph.causal_graph.CausalGraph.from_adjacency_matrix` were already class methods. Now all the `from_`
methods are consistent. This change is transparent to the user.
- This allowed us to remove them from `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph`. This change
is transparent to the user.
- Updated `cai_causal_graph.causal_graph.Skeleton` such that its nodes match the class type of its graph.
- Added ability to pass `graph_class` to the following methods in `cai_causal_graph.causal_graph.Skeleton` such that
the node classes will match accordingly when the new `cai_causal_graph.causal_graph.Skeleton` is constructed:
- `cai_causal_graph.causal_graph.Skeleton.from_dict`
- `cai_causal_graph.causal_graph.Skeleton.from_adjacency_matrix`
- `cai_causal_graph.causal_graph.Skeleton.from_networkx`
- `cai_causal_graph.causal_graph.Skeleton.from_gml_string`
- Note that `cai_causal_graph.causal_graph.Skeleton.from_dict` was already a class method but the other three
were also changed to class methods for consistency. This change is transparent to the user.
- Fixed a bug where the `cai_causal_graph.type_definitions.NodeVariableType` was not synced between the
`cai_causal_graph.causal_graph.CausalGraph` and `cai_causal_graph.causal_graph.Skeleton`.
- Changed `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.from_adjacency_matrices` from a static method
to a class method to align with other `from_` methods.
- Updated `numpy` dependency from `"^1.18.0"` to `"^1.20.0"` and allow different `numpy` versions in the
`poetry.lock` for `python` `3.8` and `3.9` - `3.12`. This is to allow specific versions for `3.8` and the others
as there is no version of `numpy` that supports them all.
- Upgraded `poetry` version from `1.4.2` to `1.7.1` in the GitHub workflows.
- Moved `mypy` from a dev dependency to a dependency as it is now used in source code.
- Updated actions in GitHub workflows to transition from `Node` `16` to `Node` `20`.

0.4.2

- Added the `validate` flag to `cai_causal_graph.causal_graph.CausalGraph.add_edge`,
`cai_causal_graph.causal_graph.CausalGraph.add_edges_from`,
`cai_causal_graph.causal_graph.CausalGraph.add_edges_from_paths`,
`cai_causal_graph.causal_graph.CausalGraph.add_edge_by_pair`,
`cai_causal_graph.causal_graph.CausalGraph.from_dict`,
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.add_edge`, and
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.add_time_edge` which, if set to `False`, will disable
validation checks. Currently, this disables cyclicity checks when adding edges. Default is `True`, making the change
backwards compatible. There is no guarantees about the behavior of the resulting graph if this is disabled
specifically to introduce cycles. This should only be used to speed up this method in situations where it is known
the resulting graph is still valid, for example when copying a graph.

Page 3 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.