Skip to main content

limen.utils

Hold the smaller cross-cutting helpers that support experiments without belonging to one primary domain package.

Canonical docs

What this package owns

Owns general utilities such as legacy parameter sampling, data_dict conversion, confidence filtering, stationarity testing, price-line helpers, and report formatting. Does not own the canonical experiment, feature, metric, or backtest surfaces.

Key entry points

Entry pointUse caseNotes
ParamSpaceLegacy basic UEL.run() path and need permutation samplingAdvanced runs use SearchStrategy and ParamDomain instead
data_dict_to_numpyNumpy arrays from the standard Limen data_dictCommon inside sklearn-style model functions
confidence_filtering_systemPost-prediction filtering based on model agreementAn optional downstream helper, not part of the main UEL contract
adf_testAugmented Dickey-Fuller stationarity testRequires the stats extra
AdfResultTyped ADF resultReturned by adf_test
find_price_lines, filter_lines_by_quantilePrice-line discovery and filteringUsed by line-based research surfaces
binary_metrics, continuous_metrics, safe_ovr_aucMetric convenience re-exportsCanonical ownership remains in limen.metrics
format_report_header, format_report_section, format_report_footerFormatted text summariesUtility surface, not a canonical reporting framework

Adjacent modules

  • limen.experiment uses ParamSpace on the legacy run path.
  • limen.metrics provides the canonical scoring helpers that this package partially re-exports for convenience.
  • limen.sfd.reference_architecture often calls data_dict_to_numpy.

Quick orientation

utils/
├── param_space.py # Legacy permutation sampler
├── data_dict_to_numpy.py # Convert Limen data_dict to numpy arrays
├── confidence_filtering_system.py # Confidence-based prediction filtering
├── adf_test.py # Optional statsmodels-backed ADF test
├── find_price_lines.py # Price-line discovery
├── filter_lines_by_quantile.py # Price-line filtering
└── reporting.py # Text-formatting helpers

Things to know

  • This package is intentionally mixed. If a helper grows into a coherent subsystem, move it out of utils.
  • ParamSpace is the legacy path, not the long-term abstraction for advanced search.
  • data_dict_to_numpy assumes the standard Limen split schema and supports model code.