causal_testing.surrogate.surrogate_search_algorithms
Module containing implementation of search algorithm for surrogate search
Module Contents
Classes
Implementation of SearchAlgorithm class. Implements genetic search algorithm for surrogate models. |
- class causal_testing.surrogate.surrogate_search_algorithms.GeneticSearchAlgorithm(delta=0.05, config: dict = None)
Bases:
causal_testing.surrogate.causal_surrogate_assisted.SearchAlgorithmImplementation of SearchAlgorithm class. Implements genetic search algorithm for surrogate models.
- search(surrogate_models: list[causal_testing.estimation.cubic_spline_estimator.CubicSplineRegressionEstimator], scenario: causal_testing.specification.scenario.Scenario) list
Function which implements a search routine which searches for the optimal fitness value for the specified scenario :param surrogate_models: The surrogate models to be searched :param scenario: The modelling scenario
- static create_gene_types(surrogate_model: causal_testing.estimation.cubic_spline_estimator.CubicSplineRegressionEstimator, scenario: causal_testing.specification.scenario.Scenario) tuple[list, list]
Generate the gene_types and gene_space for a given fitness function and scenario :param surrogate_model: Instance of a CubicSplineRegressionEstimator :param scenario: The modelling scenario