Skip to content

Add explicit target inversion to output recipes - #1069

Draft
RBendias wants to merge 7 commits into
mainfrom
feat/explicit-target-inverse
Draft

RBendias wants to merge 7 commits into
mainfrom
feat/explicit-target-inverse

Conversation

@RBendias

@RBendias RBendias commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Add sdm.processing.InvertTarget as an explicit output processor bound to the fitted Recipe.target pipeline.

Users choose its position in Recipe.output; there is no first-step restriction or automatic inversion for explicitly supplied output pipelines. Omitting the step leaves predictions and their gradients in the transformed target space. Classification predictions pass through unchanged.

Each estimator uses its own fitted target state by default. After estimator reduction, InvertTarget(member=...) selects the state to apply; a single fitted estimator needs no selection.

import sdm.processing as sp

# Clip in the original target space:
recipe = sp.Recipe(
    target=sp.Standardize(),
    output=[sp.InvertTarget(), sp.Clip(-1.0, 1.0)],
)

# Clip in the transformed target space instead:
recipe = sp.Recipe(
    target=sp.Standardize(),
    output=[sp.Clip(-1.0, 1.0), sp.InvertTarget()],
)

# Invert a reduced prediction with an explicitly selected target state:
recipe = sp.Recipe(
    target=sp.Standardize(),
    output=[sp.AverageEstimators(), sp.InvertTarget(member=0)],
)

Recipe(output=None) defaults to InvertTarget(). Built-in TabICLv2, TabFM, and KumoTabular recipes include the step explicitly to preserve their existing prediction behavior. Both direct and cached execution use the output pipeline for target inversion, including differentiable output processing.

@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant