Reproducibility
InsideForest relies on randomness during tree training and region sampling. Follow these guidelines to produce repeatable experiments.
Fix random seeds
- Set
random_statein the underlying forest viarf_params. - When using NumPy or pandas pipelines, seed them explicitly:
np.random.seed(42). - Use
PYTHONHASHSEED=0when running scripts to keep hashing consistent.
Log environment details
- Capture the output of
pip freezeorconda env exportin each experiment folder. - Document the dataset version, preprocessing steps, and any filtering applied before training.
- Record hardware characteristics (CPU cores, RAM) when benchmarking performance.
Persist models and metadata
- Use
save/loadon canonical clusterers to archive fitted models. - Store
raw_regions_,regions_,region_metrics_,labels_, and the output ofregion_quality_report. - Use version control (Git) to track notebooks and configuration files.
Automate checks
- Create smoke tests that run
fitandpredicton a reduced dataset. - Assert coverage, AMI, purity, region count, and assignment stability thresholds; include
-1. - Schedule periodic runs with tools such as GitHub Actions to validate dependencies.
Share results
Combine these practices with the logging templates from Experiments & Benchmarks so collaborators can reproduce findings with minimal setup.