API: Domain presets
Finance
Bases: BaseEstimator
Panel-data preset for cross-sectional stock rankers.
Defaults: PurgedWalkForward + rank residualization + finance g-features +
HealthIndex for per-date context gating.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_model
|
Any
|
Primary ranker (defaults to HGB regressor inside :class: |
None
|
date_col
|
str
|
Column holding the cross-section date / group label. |
'date'
|
target_col
|
str | None
|
Column holding the ranking target. If |
None
|
horizon
|
int | None
|
Optional return horizon in days; selects |
None
|
feature_cols
|
list[str] | None
|
Explicit g-feature columns; otherwise uses :data: |
None
|
cv
|
Any
|
Walk-forward splitter settings ( |
5
|
embargo
|
Any
|
Walk-forward splitter settings ( |
5
|
health_index
|
HealthIndex | None
|
Context health scorer (default: three-component :class: |
None
|
fit(panel_df, y=None)
Fit on a long-format panel DataFrame.
predict_epistemic(panel_df)
Rank-residualized epistemic uncertainty per row.
calibrate(panel_df, *, alpha=0.1)
Conformal-calibrate on a held-out panel split (separate from fit).
health_report(panel_df)
Per-date composite context health (Finding 2 remedy).
rank_coupling_report(panel_df)
Diagnostic: rank-geometry coupling before/after residualization.
Thesis-equivalent walk-forward g(x) on enriched residual panels.
Fits :class:~deup.core.error_estimator.ErrorEstimator with LightGBM on each
expanding fold window — the direct migration of train_g_walk_forward.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enriched
|
Any
|
Panel with |
required |
fold_sort
|
FoldSort
|
|
'numeric'
|
Tabular
Ergonomic tabular preset — delegates to core DEUP estimators.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_model
|
Any
|
Primary predictor |
None
|
backend
|
BackendKind
|
|
'sklearn'
|
error_model
|
Any
|
Secondary error predictor |
None
|
task
|
TaskKind
|
|
'regression'
|
cv
|
Any
|
Forwarded / used as in the core estimator. |
5
|
random_state
|
Any
|
Forwarded / used as in the core estimator. |
5
|
include_raw
|
Any
|
Forwarded / used as in the core estimator. |
5
|
backend
property
Configured gradient-boosting / sklearn backend.
estimator
property
Underlying core estimator (for advanced composition).
Vision
Classification preset: embedding → density + variance → g(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
embedding
|
BaseEstimator | Callable[[ArrayLike], ArrayLike] | None
|
Optional sklearn transformer or callable mapping raw inputs to embeddings.
Defaults to :class: |
None
|
cv
|
Any
|
|
5
|