ETIA.CausalLearning.model_validation_protocols package

Subpackages

Submodules

ETIA.CausalLearning.model_validation_protocols.MVP_ProtocolBase module

class MVP_ProtocolBase[source]

Bases: object

A base class for running protocols for causal discovery algorithms.

This class provides the foundation for implementing various protocols to evaluate causal discovery algorithms. Derived classes should implement specific protocols (e.g., KFoldCV, Holdout). This class should not be instantiated directly.

set_params(parameters)[source]

Sets the parameters for the protocol.

run_protocol(data, algorithm, parameters, n_jobs=1)[source]

Runs the protocol and returns the results in array format.

set_params(parameters)[source]

Sets the parameters of the protocol.

Parameters:

parameters (dict) – A dictionary containing the protocol-specific parameters to set. Each key corresponds to a parameter name and its value defines the parameter’s value.

Return type:

None

run_protocol(data, algorithm, parameters, n_jobs=1)[source]

Runs the protocol using the specified causal discovery algorithm and dataset.

Parameters:
  • data (Any) – The dataset on which to run the causal discovery algorithm. Can be in various formats (e.g., pandas DataFrame).

  • algorithm (Any) – The causal discovery algorithm to evaluate within the protocol.

  • parameters (dict) – A dictionary of parameters for both the protocol and the algorithm.

  • n_jobs (int, optional) – The number of parallel jobs to run during the evaluation. Default is 1.

Returns:

The results of the protocol in array format, which may vary based on the specific implementation.

Return type:

Any

ETIA.CausalLearning.model_validation_protocols.available_mvp_protocols module