Search Traces
Documentation · 05
Search Traces
Track how the best symbolic program changes through a SymbolicNature search and export the trace for later analysis.
Enable tracing
Official V1.0.0 presets enable trace_search=True with a default trace limit of 512 entries.
model = create_regressor(
"icp",
preset="balanced",
trace_search=True,
trace_max_entries=512,
random_state=42,
)
model.fit(X, y)
Read the trace
from symbolicnature import search_trace
trace = search_trace(model)
for row in trace[:5]:
print(row)
Export the trace
from symbolicnature import save_search_trace_csv
save_search_trace_csv(
model,
"results/icp_search_trace.csv",
)
Why record a search trace?
A final expression does not show how a search reached that solution. Search traces can preserve generation-level changes to the best program and associated research metadata such as fitness, structural information and evaluation accounting.
Research use. Search traces are particularly useful when comparing convergence behavior, detecting long stagnation periods and documenting when important model improvements occurred relative to the evaluation budget.
Comments
Post a Comment