SR Approach
SRToolkit.approaches.sr_approach
This module contains the SR_approach class, which is the base class for all symbolic regression approaches.
SR_approach
The base class for all symbolic regression approaches. Any symbolic regression approach should inherit from this class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the approach. |
required |
Source code in SRToolkit/approaches/sr_approach.py
search
Run the symbolic regression search.
Implementations should use the provided evaluator to score generated expressions.
All evaluation results are stored inside sr_evaluator, so nothing is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sr_evaluator
|
SR_evaluator
|
Evaluator used for scoring expressions. |
required |
seed
|
Optional[int]
|
Random seed used for generating expressions. |
None
|
Source code in SRToolkit/approaches/sr_approach.py
clone
Clones the SR_approach instance. This is used to make multiple independent copies of the approach and making multiple independent evaluations/parallel evaluations of the approach possible. If the approach is stateless, returning self is sufficient, otherwise a deep copy of the approach should be returned. This allows us to do pretraining and finetuning of the approach independently.