Skip to content

Commit 051861e

Browse files
function & class strings for ABC classes
1 parent 7c2d01d commit 051861e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

causal_testing/surrogate/causal_surrogate_assisted.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,31 @@ class SearchAlgorithm:
3131

3232
def generate_fitness_functions(self, surrogate_models: list[Estimator]) -> list[SearchFitnessFunction]:
3333
"""Generates the fitness function of the search space
34-
:param surrogate_models: """
35-
pass
34+
:param surrogate_models: A list of CubicSplineRegressionEstimator generated for each edge of the DAG
35+
:return: A list of fitness functions mapping to each of the surrogate models in the input"""
3636

3737
def search(self, fitness_functions: list[SearchFitnessFunction], specification: CausalSpecification) -> list:
38-
pass
38+
"""Function which implements a search routine which searches for the optimal fitness value for the specified
39+
scenario
40+
:param fitness_functions: The fitness function to be optimised
41+
:param specification: The Causal Specification (combination of Scenario and Causal Dag)"""
3942

4043

4144
class Simulator:
4245
"""Class to be inherited with Simulator specific functions to start, shutdown and run the simulation with the give
4346
config file"""
4447

4548
def startup(self, **kwargs):
46-
pass
49+
"""Function that when run, initialises and opens the Simulator"""
4750

4851
def shutdown(self, **kwargs):
49-
pass
52+
"""Function to safely exit and shutdown the Simulator"""
5053

5154
def run_with_config(self, configuration) -> SimulationResult:
52-
pass
55+
"""Run the simulator with the given configuration and return the results in the structure of a
56+
SimulationResult
57+
:param configuration:
58+
:return: Simulation results in the structure of the SimulationResult data class"""
5359

5460

5561
class CausalSurrogateAssistedTestCase:

0 commit comments

Comments
 (0)