ProGED
SRToolkit.approaches.ProGED
This module contains the ProGED approach - Probabilistic grammar-based equation discovery.
ProGED
Bases: SR_approach
A slimmed down version of the ProGED approach. You can find the full version of the approach at https://github.com/brencej/ProGED and the paper presenting the approach at https://www.sciencedirect.com/science/article/pii/S0950705121003403.
The approach randomly samples expressions from a probabilistic grammar and evaluates them on the dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grammar
|
Union[str, SymbolLibrary]
|
The grammar to use for sampling expressions. Can be either a string or a SymbolLibrary object. Using a string let's you define a custom grammar. |
required |
verbose
|
bool
|
If True, prints the expression and its error if the expression is better than the current best. |
False
|
Source code in SRToolkit/approaches/ProGED.py
search
Samples expressions from the grammar using the Monte Carlo approach and evaluates them on the dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sr_evaluator
|
SR_evaluator
|
The evaluator used for scoring expressions. |
required |
seed
|
Optional[int]
|
The seed used for random number generation. |
None
|
Source code in SRToolkit/approaches/ProGED.py
clone
Clones the ProGED approach.
Returns:
| Type | Description |
|---|---|
|
The approach is stateless, so this method only returns the object itself. |